java.lang.Object
io.github.hglabplh_tech.reflect.clojure.api.utils.FieldsUtil

public class FieldsUtil extends Object
This s a utility class for conversion from Java Types to clojure vectors or maps representing the content
  • Method Details

    • getFieldName

      public static String getFieldName(Field field)
      Get the fields name
      Parameters:
      field - the field
      Returns:
      the field name
    • getFieldType

      public static Class<?> getFieldType(Field field)
      Get the type of the field as Class
      Parameters:
      field - the field
      Returns:
      the class representing the field type
    • getFieldModifier

      public static Integer getFieldModifier(Field field)
      Get the field modifiers integer
      Parameters:
      field - the field
      Returns:
      the field modifiers integer
    • getAllAnnotations

      public static clojure.lang.IPersistentVector getAllAnnotations(Field field)
      Get all annotations of a field
      Parameters:
      field - the field
      Returns:
      all annotations of the field
    • getGenericType

      public static Type getGenericType(Field field)
      Get the generic type of the field
      Parameters:
      field - the field
      Returns:
      the generic type
    • getAnnotType

      public static AnnotatedType getAnnotType(Field field)
      Get the annotated type of the field
      Parameters:
      field - the field
      Returns:
      the annotated type
    • isSynthetic

      public static boolean isSynthetic(Field field)
      Ask if the field is synthetic
      Parameters:
      field - the field
      Returns:
      true if it is synthetic / false otherwise
    • isEnumConst

      public static boolean isEnumConst(Field field)
      Ask if the field is a enum constant
      Parameters:
      field - the field
      Returns:
      true if it is a enum contant / false otherwise