クラス EnvaliFieldHelper
public final class EnvaliFieldHelper extends Object
ValidatableEntity .- 導入されたバージョン:
- 1.0.0
-
メソッドの概要
修飾子とタイプ メソッド 説明 booleanequals(Object o)Objectget()Returns an object value from a field object.Object[]getArray()Returns an array from a field object.bytegetByte()Returns a byte value from a field object.doublegetDouble()Returns a double value from a field object.StringgetEntityName()Returns the name of validatable entity.StringgetEntitySimpleName()Returns the simple name of validatable entity.floatgetFloat()Returns a float value from a field object.TypegetGenericType()Returns the generic type.intgetInt()Returns an int value from a field object.List<?>getList()Returns a list from a field object.longgetLong()Returns a long value from a field object.Map<?,?>getMap()Returns a map from a field object.StringgetName()Returns the field name.ParameterizedTypegetParameterizedType()The list of parameterized validatable entityList<Class<?>>getParameterizedValidatableEntities()The list of parameterized validatable entitySet<?>getSet()Returns a set from a field object.shortgetShort()Returns a short value from a field object.StringgetString()Returns a string value from a field object.Class<?>getType()The field data typeValidatableEntitygetValidatableEntity()Returns a validatable entity from a field object.List<ValidatableEntity>getValidatableEntityList()Returns a list of validatable entity from a field object.Map<?,ValidatableEntity>getValidatableEntityMap()Returns a map of validatable entity from a field object.Set<ValidatableEntity>getValidatableEntitySet()Returns a set of validatable entity from a field object.inthashCode()booleanhasParameterizedValidatableEntity()Tests if the field hasValidatableEntityas parameterized data type.booleanisArray()Tests if the data type of the field is Array.booleanisByte()Tests if the data type of the field is Byte.booleanisCollection()Tests if the data type of the field is collection.booleanisDouble()Tests if the data type of the field is Double.booleanisFloat()Tests if the data type of the field is Float.booleanisInteger()Tests if the data type of the field is Integer.booleanisList()Tests if the data type of the field is List.booleanisLong()Tests if the data type of the field is Long.booleanisMap()Tests if the data type of the field is Map.booleanisSet()Tests if the data type of the field is Set.booleanisShort()Tests if the data type of the field is Short.booleanisString()Tests if the data type of the field is String.booleanisValidatableEntity()Tests if the data type of the field isValidatableEntity.static EnvaliFieldHelperof(@NonNull ValidatableEntity validatableEntity, @NonNull Field field)Returns the new instance ofEnvaliFieldHelperobject;StringtoString()
-
メソッドの詳細
-
of
public static EnvaliFieldHelper of(@NonNull @NonNull ValidatableEntity validatableEntity, @NonNull @NonNull Field field)Returns the new instance ofEnvaliFieldHelperobject;- パラメータ:
validatableEntity- The validatable entityfield- The field- 戻り値:
- The new instance of
EnvaliFieldHelperobject - 例外:
NullPointerException- Ifnullis passed as an argument
-
get
Returns an object value from a field object.- 戻り値:
- An object field value
- 例外:
UnsupportedOperationException- If a different object is passed during the reflection process, otherwise if an attempt is made to access an area that does not meet the permissions during the reflection process
-
getEntityName
Returns the name of validatable entity.- 戻り値:
- The field type
-
getEntitySimpleName
Returns the simple name of validatable entity.- 戻り値:
- The field type
-
getGenericType
Returns the generic type.- 戻り値:
- The generic type
-
getName
Returns the field name.- 戻り値:
- The field name
-
getString
Returns a string value from a field object.- 戻り値:
- A string field value
-
getInt
public int getInt()Returns an int value from a field object.- 戻り値:
- An int field value
-
getLong
public long getLong()Returns a long value from a field object.- 戻り値:
- A long field value
-
getShort
public short getShort()Returns a short value from a field object.- 戻り値:
- A short field value
-
getByte
public byte getByte()Returns a byte value from a field object.- 戻り値:
- A byte field value
-
getFloat
public float getFloat()Returns a float value from a field object.- 戻り値:
- A float field value
-
getDouble
public double getDouble()Returns a double value from a field object.- 戻り値:
- A double field value
-
getArray
Returns an array from a field object.- 戻り値:
- A field object of array
-
getList
Returns a list from a field object.- 戻り値:
- A field object of list
-
getMap
Returns a map from a field object.- 戻り値:
- A field object of map
-
getSet
Returns a set from a field object.- 戻り値:
- A field object of set
-
getValidatableEntityList
Returns a list of validatable entity from a field object.This method was created to get a ValidatableEntity in the strategy class corresponding to the NestedEntity annotation. When the strategy class corresponding to the NestedEntity annotation is started, it is already guaranteed that the field object is a ValidatableEntity, so there is no need to check when casting.
- 戻り値:
- A field object of validatable entity list
-
getValidatableEntityMap
Returns a map of validatable entity from a field object.This method was created to get a ValidatableEntity in the strategy class corresponding to the NestedEntity annotation. When the strategy class corresponding to the NestedEntity annotation is started, it is already guaranteed that the field object is a ValidatableEntity, so there is no need to check when casting.
- 戻り値:
- A field object of validatable entity map
-
getValidatableEntitySet
Returns a set of validatable entity from a field object.This method was created to get a ValidatableEntity in the strategy class corresponding to the NestedEntity annotation. When the strategy class corresponding to the NestedEntity annotation is started, it is already guaranteed that the field object is a ValidatableEntity, so there is no need to check when casting.
- 戻り値:
- A field object of validatable entity set
-
getValidatableEntity
Returns a validatable entity from a field object.- 戻り値:
- A field object of validatable entity
-
isString
public boolean isString()Tests if the data type of the field is String.- 戻り値:
trueif the data type of field is String, otherwisefalse
-
isInteger
public boolean isInteger()Tests if the data type of the field is Integer.- 戻り値:
trueif the data type of field is Integer, otherwisefalse
-
isLong
public boolean isLong()Tests if the data type of the field is Long.- 戻り値:
trueif the data type of field is Long, otherwisefalse
-
isShort
public boolean isShort()Tests if the data type of the field is Short.- 戻り値:
trueif the data type of field is Short, otherwisefalse
-
isByte
public boolean isByte()Tests if the data type of the field is Byte.- 戻り値:
trueif the data type of field is Byte, otherwisefalse
-
isFloat
public boolean isFloat()Tests if the data type of the field is Float.- 戻り値:
trueif the data type of field is Float, otherwisefalse
-
isArray
public boolean isArray()Tests if the data type of the field is Array.- 戻り値:
trueif the data type of field is Array, otherwisefalse
-
isList
public boolean isList()Tests if the data type of the field is List.- 戻り値:
trueif the data type of field is List, otherwisefalse
-
isMap
public boolean isMap()Tests if the data type of the field is Map.- 戻り値:
trueif the data type of field is Map, otherwisefalse
-
isSet
public boolean isSet()Tests if the data type of the field is Set.- 戻り値:
trueif the data type of field is Set, otherwisefalse
-
isCollection
public boolean isCollection()Tests if the data type of the field is collection.- 戻り値:
trueif the data type of field is List, Map or Set, otherwisefalse
-
isDouble
public boolean isDouble()Tests if the data type of the field is Double.- 戻り値:
trueif the data type of field is Double, otherwisefalse
-
isValidatableEntity
public boolean isValidatableEntity()Tests if the data type of the field isValidatableEntity.- 戻り値:
trueif the data type of field isValidatableEntity, otherwisefalse
-
hasParameterizedValidatableEntity
public boolean hasParameterizedValidatableEntity()Tests if the field hasValidatableEntityas parameterized data type.- 戻り値:
trueif the field hasValidatableEntityas parameterized data type, otherwisefalse
-
toString
-
equals
-
hashCode
public int hashCode() -
getType
The field data type -
getParameterizedType
The list of parameterized validatable entity -
getParameterizedValidatableEntities
The list of parameterized validatable entity
-