Class NativeTypeRegistrationWrapper
java.lang.Object
com.blamejared.crafttweaker_annotations.annotations.NativeTypeRegistrationWrapper
Wrapper class to read attribute values from Annotation NativeTypeRegistration.
-
Method Summary
Modifier and TypeMethodDescriptionGets the element on which the wrapped annotation is used.Gets the wrapped AnnotationMirror.Gets the NativeTypeRegistration.constructors from wrapped annotation.Gets the NativeTypeRegistration.constructors from wrapped annotation.booleanAllows to check if attribute was explicitly set or if default value is used.static booleanisAnnotated(Element element) Checks if passed element is annotated with this wrapper annotation type : NativeTypeRegistrationGets the NativeTypeRegistration.value from wrapped annotation.Gets the NativeTypeRegistration.value from wrapped annotation.io.toolisticon.aptk.tools.TypeMirrorWrapperGets the NativeTypeRegistration.value from wrapped annotation.wrap(AnnotationMirror annotationMirror) Wraps an AnnotationMirror.Gets the AnnotationMirror from passed element for this wrappers annotation type and creates a wrapper instance.wrap(Element element, AnnotationMirror annotationMirror) Wraps an AnnotationMirror.Gets the NativeTypeRegistration.zenCodeName from wrapped annotation.
-
Method Details
-
_annotatedElement
Gets the element on which the wrapped annotation is used. -
_annotationMirror
Gets the wrapped AnnotationMirror. -
valueAsTypeMirror
Gets the NativeTypeRegistration.value from wrapped annotation.- Returns:
- the attribute value as a TypeMirror
-
valueAsTypeMirrorWrapper
public io.toolisticon.aptk.tools.TypeMirrorWrapper valueAsTypeMirrorWrapper()Gets the NativeTypeRegistration.value from wrapped annotation.- Returns:
- the attribute value as a TypeMirror
-
valueAsFqn
Gets the NativeTypeRegistration.value from wrapped annotation.- Returns:
- the attribute value as a fqn
-
zenCodeName
Gets the NativeTypeRegistration.zenCodeName from wrapped annotation.- Returns:
- the attribute value
-
constructorsAsAnnotationMirrorArray
Gets the NativeTypeRegistration.constructors from wrapped annotation.- Returns:
- the attribute value
-
constructors
Gets the NativeTypeRegistration.constructors from wrapped annotation.- Returns:
- the attribute value
-
constructorsIsDefaultValue
public boolean constructorsIsDefaultValue()Allows to check if attribute was explicitly set or if default value is used.- Returns:
- true, if default value is used, otherwise false
-
isAnnotated
Checks if passed element is annotated with this wrapper annotation type : NativeTypeRegistration- Parameters:
element- The element to check for wrapped annotation type- Returns:
- true, if passed element is annotated with NativeTypeRegistration annotation, otherwise false
-
wrap
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
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 NativeTypeRegistrationWrapper 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 AnnotationMirrorannotationMirror- The AnnotationMirror to wrap- Returns:
- The wrapper instance
-