Class FieldsUtil
java.lang.Object
io.github.hglabplh_tech.reflect.clojure.api.utils.FieldsUtil
This s a utility class for conversion from Java Types to clojure vectors
or maps representing the content
-
Method Summary
Modifier and TypeMethodDescriptionstatic clojure.lang.IPersistentVectorgetAllAnnotations(Field field) Get all annotations of a fieldstatic AnnotatedTypegetAnnotType(Field field) Get the annotated type of the fieldstatic IntegergetFieldModifier(Field field) Get the field modifiers integerstatic StringgetFieldName(Field field) Get the fields namestatic Class<?>getFieldType(Field field) Get the type of the field as Classstatic TypegetGenericType(Field field) Get the generic type of the fieldstatic booleanisEnumConst(Field field) Ask if the field is a enum constantstatic booleanisSynthetic(Field field) Ask if the field is synthetic
-
Method Details
-
getFieldName
Get the fields name- Parameters:
field- the field- Returns:
- the field name
-
getFieldType
Get the type of the field as Class- Parameters:
field- the field- Returns:
- the class representing the field type
-
getFieldModifier
Get the field modifiers integer- Parameters:
field- the field- Returns:
- the field modifiers integer
-
getAllAnnotations
Get all annotations of a field- Parameters:
field- the field- Returns:
- all annotations of the field
-
getGenericType
Get the generic type of the field- Parameters:
field- the field- Returns:
- the generic type
-
getAnnotType
Get the annotated type of the field- Parameters:
field- the field- Returns:
- the annotated type
-
isSynthetic
Ask if the field is synthetic- Parameters:
field- the field- Returns:
- true if it is synthetic / false otherwise
-
isEnumConst
Ask if the field is a enum constant- Parameters:
field- the field- Returns:
- true if it is a enum contant / false otherwise
-