Class AnnotationUtils

java.lang.Object
com.mrivanplays.annotationconfig.core.utils.AnnotationUtils

public final class AnnotationUtils extends Object
A utility class with utilities about AnnotationConfig's default annotations.
Since:
2.1.0
Author:
MrIvanPlays
  • Method Details

    • getKey

      public static String getKey(Field field)
      Returns the key of the specified Field
      Parameters:
      field - the field you want the key of
      Returns:
      the key, always a non-null value
    • isIgnored

      public static boolean isIgnored(Field field)
      Returns whether the specified Field is ignored upon generation.
      Parameters:
      field - the field you want to check if ignored
      Returns:
      true or false
    • isConfigObject

      public static boolean isConfigObject(Field field)
      Returns whether the specified Field is a config object.
      Parameters:
      field - the field you want to check if config object
      Returns:
      true or false
    • isRawConfigAccess

      public static boolean isRawConfigAccess(Field field)
      Returns whether the specified Field is an accessor of the raw config.

      The raw config in the terminology of AnnotationConfig is the raw values, read from the config.

      Parameters:
      field - the field you want to check if raw config
      Returns:
      true or false
    • getComments

      public static List<String> getComments(Field field)
      Returns the comments of the specified Field
      Parameters:
      field - the field you want to get the comments of
      Returns:
      comments, either an empty list or a list with comments