@Internal public class GroovyParameterElement extends AbstractGroovyElement implements ParameterElement
ParameterElement
for Groovy.compilationUnit, sourceUnit, visitorContext
EMPTY_ELEMENT_ARRAY
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier and Type | Method and Description |
---|---|
int |
getArrayDimensions()
If the type is an array, the number of dimensions.
|
ClassElement |
getGenericType()
Returns the generic type of the element.
|
String |
getName() |
Object |
getNativeType()
Returns the native underlying type.
|
ClassElement |
getType() |
boolean |
isArray()
Is the type an array.
|
boolean |
isPrimitive()
Whether the type is primitive.
|
boolean |
isProtected() |
boolean |
isPublic() |
alignNewGenericsInfo, annotate, annotate, equals, getAnnotationMetadata, getDocumentation, getGenericElement, hashCode, isPackagePrivate, removeAnnotation, removeAnnotationIf, removeStereotype, resolveAnnotationMetadata, resolveModifiers, resolveModifiers, resolveModifiers
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
getDescription, of, of
annotate, annotate, annotate, annotate, annotate, getDescription, getDocumentation, getModifiers, getSimpleName, isAbstract, isFinal, isPackagePrivate, isPrivate, isStatic, removeAnnotation, removeAnnotation, removeAnnotationIf, removeStereotype, removeStereotype
booleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, enumValues, enumValues, enumValues, enumValues, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, findRepeatableAnnotation, findRepeatableAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDeclaredMetadata, getDeclaredStereotypeAnnotationNames, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getStereotypeAnnotationNames, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasPropertyExpressions, hasSimpleAnnotation, hasSimpleDeclaredAnnotation, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isRepeatableAnnotation, isRepeatableAnnotation, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, stringValues, stringValues, synthesize, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByType
getAnnotationValuesByName, getAnnotationValuesByStereotype, getDeclaredAnnotationValuesByName, getValues, hasDeclaredStereotype, isAnnotationPresent, isDeclaredAnnotationPresent
isDeclaredNonNull, isDeclaredNullable, isNonNull, isNullable
getAnnotationMetadata
public boolean isPrimitive()
TypedElement
isPrimitive
in interface TypedElement
public boolean isArray()
TypedElement
isArray
in interface TypedElement
public int getArrayDimensions()
TypedElement
getArrayDimensions
in interface TypedElement
@Nullable public ClassElement getGenericType()
TypedElement
TypedElement.getType()
as it returns
the actual type without erasure. Whilst TypedElement.getType()
is often needed to produce the correct byte code when
generating code via ASM, the getGenericType()
method is more useful for documentation and other types of code
generation.getGenericType
in interface TypedElement
public String getName()
public boolean isProtected()
isProtected
in interface Element
public boolean isPublic()
public Object getNativeType()
Element
getNativeType
in interface Element
@NonNull public ClassElement getType()
getType
in interface ParameterElement
getType
in interface TypedElement