Class ConstructorParameterWrapper
java.lang.Object
com.blamejared.crafttweaker_annotations.annotations.ConstructorParameterWrapper
Wrapper class to read attribute values from Annotation ConstructorParameter.
-
Method Summary
Modifier and TypeMethodDescriptionGets the element on which the wrapped annotation is used.Gets the wrapped AnnotationMirror.Gets the ConstructorParameter.description from wrapped annotation.booleanAllows to check if attribute was explicitly set or if default value is used.String[]examples()Gets the ConstructorParameter.examples 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 : ConstructorParametername()Gets the ConstructorParameter.name from wrapped annotation.Gets the ConstructorParameter.type from wrapped annotation.Gets the ConstructorParameter.type from wrapped annotation.io.toolisticon.aptk.tools.TypeMirrorWrapperGets the ConstructorParameter.type from wrapped annotation.static ConstructorParameterWrapperwrap(AnnotationMirror annotationMirror) Wraps an AnnotationMirror.static ConstructorParameterWrapperGets the AnnotationMirror from passed element for this wrappers annotation type and creates a wrapper instance.static ConstructorParameterWrapperwrap(Element element, AnnotationMirror annotationMirror) Wraps an AnnotationMirror.
-
Method Details
-
_annotatedElement
Gets the element on which the wrapped annotation is used. -
_annotationMirror
Gets the wrapped AnnotationMirror. -
typeAsTypeMirror
Gets the ConstructorParameter.type from wrapped annotation.- Returns:
- the attribute value as a TypeMirror
-
typeAsTypeMirrorWrapper
public io.toolisticon.aptk.tools.TypeMirrorWrapper typeAsTypeMirrorWrapper()Gets the ConstructorParameter.type from wrapped annotation.- Returns:
- the attribute value as a TypeMirror
-
typeAsFqn
Gets the ConstructorParameter.type from wrapped annotation.- Returns:
- the attribute value as a fqn
-
name
Gets the ConstructorParameter.name from wrapped annotation.- Returns:
- the attribute value
-
description
Gets the ConstructorParameter.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
-
examples
Gets the ConstructorParameter.examples from wrapped annotation.- Returns:
- the attribute value
-
examplesIsDefaultValue
public boolean examplesIsDefaultValue()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 : ConstructorParameter- Parameters:
element- The element to check for wrapped annotation type- Returns:
- true, if passed element is annotated with ConstructorParameter 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
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
-