Class AnnotationEnumValue

  • All Implemented Interfaces:
    java.lang.Comparable<AnnotationEnumValue>

    public class AnnotationEnumValue
    extends java.lang.Object
    implements java.lang.Comparable<AnnotationEnumValue>
    Class for wrapping an enum constant value (split into class name and constant name), as used as an annotation parameter value.
    • Field Detail

      • scanResult

        protected transient ScanResult scanResult
        The scan result.
    • Method Detail

      • getClassName

        public java.lang.String getClassName()
        Get the class name.
        Returns:
        The name of the enum class.
      • getValueName

        public java.lang.String getValueName()
        Get the value name.
        Returns:
        The name of the enum const value.
      • getName

        public java.lang.String getName()
        Get the name.
        Returns:
        The fully-qualified name of the enum constant value, i.e. (getClassName() + {#getValueName()}).
      • loadClassAndReturnEnumValue

        public java.lang.Object loadClassAndReturnEnumValue​(boolean ignoreExceptions)
                                                     throws java.lang.IllegalArgumentException
        Loads the enum class, instantiates the enum constants for the class, and returns the enum constant value represented by this AnnotationEnumValue.
        Parameters:
        ignoreExceptions - If true, ignore classloading exceptions and return null on failure.
        Returns:
        The enum constant value represented by this AnnotationEnumValue
        Throws:
        java.lang.IllegalArgumentException - if the class could not be loaded and ignoreExceptions was false, or if the enum constant is invalid.
      • loadClassAndReturnEnumValue

        public java.lang.Object loadClassAndReturnEnumValue()
                                                     throws java.lang.IllegalArgumentException
        Loads the enum class, instantiates the enum constants for the class, and returns the enum constant value represented by this AnnotationEnumValue.
        Returns:
        The enum constant value represented by this AnnotationEnumValue
        Throws:
        java.lang.IllegalArgumentException - if the class could not be loaded, or the enum constant is invalid.
      • equals

        public boolean equals​(java.lang.Object o)
        Overrides:
        equals in class java.lang.Object
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object