クラス EnvaliFieldHelper
public final class EnvaliFieldHelper extends Object
ValidatableEntity
.- 導入されたバージョン:
- 1.0.0
-
メソッドの概要
修飾子とタイプ メソッド 説明 boolean
equals(Object o)
Object
get()
Returns an object value from a field object.Object[]
getArray()
Returns an array from a field object.byte
getByte()
Returns a byte value from a field object.double
getDouble()
Returns a double value from a field object.String
getEntityName()
Returns the name of validatable entity.String
getEntitySimpleName()
Returns the simple name of validatable entity.float
getFloat()
Returns a float value from a field object.Type
getGenericType()
Returns the generic type.int
getInt()
Returns an int value from a field object.List<?>
getList()
Returns a list from a field object.long
getLong()
Returns a long value from a field object.Map<?,?>
getMap()
Returns a map from a field object.String
getName()
Returns the field name.ParameterizedType
getParameterizedType()
The list of parameterized validatable entityList<Class<?>>
getParameterizedValidatableEntities()
The list of parameterized validatable entitySet<?>
getSet()
Returns a set from a field object.short
getShort()
Returns a short value from a field object.String
getString()
Returns a string value from a field object.Class<?>
getType()
The field data typeValidatableEntity
getValidatableEntity()
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.int
hashCode()
boolean
hasParameterizedValidatableEntity()
Tests if the field hasValidatableEntity
as parameterized data type.boolean
isArray()
Tests if the data type of the field is Array.boolean
isByte()
Tests if the data type of the field is Byte.boolean
isCollection()
Tests if the data type of the field is collection.boolean
isDouble()
Tests if the data type of the field is Double.boolean
isFloat()
Tests if the data type of the field is Float.boolean
isInteger()
Tests if the data type of the field is Integer.boolean
isList()
Tests if the data type of the field is List.boolean
isLong()
Tests if the data type of the field is Long.boolean
isMap()
Tests if the data type of the field is Map.boolean
isSet()
Tests if the data type of the field is Set.boolean
isShort()
Tests if the data type of the field is Short.boolean
isString()
Tests if the data type of the field is String.boolean
isValidatableEntity()
Tests if the data type of the field isValidatableEntity
.static EnvaliFieldHelper
of(@NonNull ValidatableEntity validatableEntity, @NonNull Field field)
Returns the new instance ofEnvaliFieldHelper
object;String
toString()
-
メソッドの詳細
-
of
public static EnvaliFieldHelper of(@NonNull @NonNull ValidatableEntity validatableEntity, @NonNull @NonNull Field field)Returns the new instance ofEnvaliFieldHelper
object;- パラメータ:
validatableEntity
- The validatable entityfield
- The field- 戻り値:
- The new instance of
EnvaliFieldHelper
object - 例外:
NullPointerException
- Ifnull
is 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.- 戻り値:
true
if the data type of field is String, otherwisefalse
-
isInteger
public boolean isInteger()Tests if the data type of the field is Integer.- 戻り値:
true
if the data type of field is Integer, otherwisefalse
-
isLong
public boolean isLong()Tests if the data type of the field is Long.- 戻り値:
true
if the data type of field is Long, otherwisefalse
-
isShort
public boolean isShort()Tests if the data type of the field is Short.- 戻り値:
true
if the data type of field is Short, otherwisefalse
-
isByte
public boolean isByte()Tests if the data type of the field is Byte.- 戻り値:
true
if the data type of field is Byte, otherwisefalse
-
isFloat
public boolean isFloat()Tests if the data type of the field is Float.- 戻り値:
true
if the data type of field is Float, otherwisefalse
-
isArray
public boolean isArray()Tests if the data type of the field is Array.- 戻り値:
true
if the data type of field is Array, otherwisefalse
-
isList
public boolean isList()Tests if the data type of the field is List.- 戻り値:
true
if the data type of field is List, otherwisefalse
-
isMap
public boolean isMap()Tests if the data type of the field is Map.- 戻り値:
true
if the data type of field is Map, otherwisefalse
-
isSet
public boolean isSet()Tests if the data type of the field is Set.- 戻り値:
true
if the data type of field is Set, otherwisefalse
-
isCollection
public boolean isCollection()Tests if the data type of the field is collection.- 戻り値:
true
if 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.- 戻り値:
true
if the data type of field is Double, otherwisefalse
-
isValidatableEntity
public boolean isValidatableEntity()Tests if the data type of the field isValidatableEntity
.- 戻り値:
true
if the data type of field isValidatableEntity
, otherwisefalse
-
hasParameterizedValidatableEntity
public boolean hasParameterizedValidatableEntity()Tests if the field hasValidatableEntity
as parameterized data type.- 戻り値:
true
if the field hasValidatableEntity
as 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
-