Class NativeConstructorWrapper

java.lang.Object
com.blamejared.crafttweaker_annotations.annotations.NativeConstructorWrapper

public class NativeConstructorWrapper extends Object
Wrapper class to read attribute values from Annotation NativeConstructor.
  • Method Details

    • _annotatedElement

      public Element _annotatedElement()
      Gets the element on which the wrapped annotation is used.
    • _annotationMirror

      public AnnotationMirror _annotationMirror()
      Gets the wrapped AnnotationMirror.
    • valueAsAnnotationMirrorArray

      public AnnotationMirror[] valueAsAnnotationMirrorArray()
      Gets the NativeConstructor.value from wrapped annotation.
      Returns:
      the attribute value
    • value

      public ConstructorParameterWrapper[] value()
      Gets the NativeConstructor.value from wrapped annotation.
      Returns:
      the attribute value
    • description

      public String description()
      Gets the NativeConstructor.description from wrapped annotation.
      Returns:
      the attribute value
    • descriptionIsDefaultValue

      public boolean descriptionIsDefaultValue()
      Allows to check if attribute was explicitly set or if default value is used.
      Returns:
      true, if default value is used, otherwise false
    • deprecationMessage

      public String deprecationMessage()
      Gets the NativeConstructor.deprecationMessage from wrapped annotation.
      Returns:
      the attribute value
    • deprecationMessageIsDefaultValue

      public boolean deprecationMessageIsDefaultValue()
      Allows to check if attribute was explicitly set or if default value is used.
      Returns:
      true, if default value is used, otherwise false
    • getSinceVersion

      public String getSinceVersion()
      Gets the NativeConstructor.getSinceVersion from wrapped annotation.
      Returns:
      the attribute value
    • getSinceVersionIsDefaultValue

      public boolean getSinceVersionIsDefaultValue()
      Allows to check if attribute was explicitly set or if default value is used.
      Returns:
      true, if default value is used, otherwise false
    • getObtention

      public String getObtention()
      Gets the NativeConstructor.getObtention from wrapped annotation.
      Returns:
      the attribute value
    • getObtentionIsDefaultValue

      public boolean getObtentionIsDefaultValue()
      Allows to check if attribute was explicitly set or if default value is used.
      Returns:
      true, if default value is used, otherwise false
    • isAnnotated

      public static boolean isAnnotated(Element element)
      Checks if passed element is annotated with this wrapper annotation type : NativeConstructor
      Parameters:
      element - The element to check for wrapped annotation type
      Returns:
      true, if passed element is annotated with NativeConstructor annotation, otherwise false
    • wrap

      public static NativeConstructorWrapper wrap(Element element)
      Gets the AnnotationMirror from passed element for this wrappers annotation type and creates a wrapper instance.
      Parameters:
      element - The element to read the annotations from
      Returns:
      The wrapped AnnotationMirror if Element is annotated with this wrappers annotation type, otherwise null.
    • wrap

      public static NativeConstructorWrapper wrap(AnnotationMirror annotationMirror)
      Wraps an AnnotationMirror. Throws an IllegalArgumentException if passed AnnotationMirror type doesn't match the wrapped annotation type.
      Parameters:
      annotationMirror - The element annotated with the annotation to wrap
      Returns:
      The wrapper instance
    • wrap

      public static NativeConstructorWrapper wrap(Element element, AnnotationMirror annotationMirror)
      Wraps an AnnotationMirror. Throws an IllegalArgumentException if passed AnnotationMirror type doesn't match the wrapped annotation type.
      Parameters:
      element - the element bound to the usage of passed AnnotationMirror
      annotationMirror - The AnnotationMirror to wrap
      Returns:
      The wrapper instance