public class GroovyClassElement extends AbstractGroovyElement implements ClassElement
ClassNode.sourceUnitCLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBEREMPTY| Modifier and Type | Method and Description |
|---|---|
List<PropertyElement> |
getBeanProperties()
Returns the bean properties (getters and setters) for this class element.
|
Map<String,Map<String,org.codehaus.groovy.ast.ClassNode>> |
getGenericTypeInfo()
Builds and returns the generic type information.
|
String |
getName() |
Object |
getNativeType()
Returns the native underlying type.
|
Optional<ConstructorElement> |
getPrimaryConstructor()
Find and return a single primary constructor.
|
Optional<ClassElement> |
getSuperType()
Returns the super type of this element or empty if the element has no super type.
|
Map<String,ClassElement> |
getTypeArguments() |
Map<String,ClassElement> |
getTypeArguments(String type)
Get the type arguments for the given type name.
|
boolean |
isAbstract() |
boolean |
isArray()
Returns whether the class element is an array.
|
boolean |
isAssignable(String type)
Tests whether one type is assignable to another.
|
boolean |
isFinal() |
boolean |
isPrimitive()
Whether the type is primitive.
|
boolean |
isPrivate() |
boolean |
isProtected() |
boolean |
isPublic() |
boolean |
isStatic() |
String |
toString() |
alignNewGenericsInfo, annotate, getAnnotationMetadata, getGenericElementclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitgetFields, getFields, getFirstTypeArgument, getPackageName, getSimpleName, getType, getTypeArguments, isAssignable, isEnum, isInterface, isIterablegetGenericTypeannotate, annotate, annotate, annotate, getDocumentationbooleanValue, booleanValue, booleanValue, booleanValue, classValue, classValue, classValue, classValue, classValues, classValues, classValues, classValues, doubleValue, doubleValue, doubleValue, enumValue, enumValue, enumValue, enumValue, findAnnotation, findAnnotation, findDeclaredAnnotation, findDeclaredAnnotation, getAnnotation, getAnnotation, getAnnotationNameByStereotype, getAnnotationNameByStereotype, getAnnotationNames, getAnnotationNamesByStereotype, getAnnotationNamesByStereotype, getAnnotationType, getAnnotationTypeByStereotype, getAnnotationTypeByStereotype, getAnnotationTypesByStereotype, getAnnotationValuesByType, getDeclaredAnnotation, getDeclaredAnnotation, getDeclaredAnnotationNameByStereotype, getDeclaredAnnotationNames, getDeclaredAnnotationNamesByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationTypeByStereotype, getDeclaredAnnotationValuesByType, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValue, getDefaultValues, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValue, getValues, getValues, hasAnnotation, hasAnnotation, hasDeclaredAnnotation, hasDeclaredAnnotation, hasDeclaredStereotype, hasDeclaredStereotype, hasDeclaredStereotype, hasStereotype, hasStereotype, hasStereotype, hasStereotype, intValue, intValue, intValue, isAnnotationPresent, isDeclaredAnnotationPresent, isEmpty, isFalse, isFalse, isPresent, isPresent, isTrue, isTrue, longValue, longValue, stringValue, stringValue, stringValue, stringValue, stringValues, stringValues, synthesize, synthesizeAll, synthesizeAnnotationsByType, synthesizeDeclared, synthesizeDeclared, synthesizeDeclaredAnnotationsByTypehasSimpleAnnotation, hasSimpleDeclaredAnnotationisDeclaredNullable, isNullablegetAnnotationMetadatapublic boolean isPrimitive()
TypedElementisPrimitive in interface TypedElementpublic Optional<ClassElement> getSuperType()
ClassElementgetSuperType in interface ClassElement@Nonnull public Optional<ConstructorElement> getPrimaryConstructor()
ClassElementCreator or Inject.getPrimaryConstructor in interface ClassElementpublic Map<String,Map<String,org.codehaus.groovy.ast.ClassNode>> getGenericTypeInfo()
@Nonnull public Map<String,ClassElement> getTypeArguments(@Nonnull String type)
ClassElementgetTypeArguments in interface ClassElementtype - The type to retrieve type arguments for@Nonnull public Map<String,ClassElement> getTypeArguments()
getTypeArguments in interface ClassElementpublic List<PropertyElement> getBeanProperties()
ClassElementgetBeanProperties in interface ClassElementpublic boolean isArray()
ClassElementisArray in interface ClassElementisArray in interface TypedElementpublic String getName()
public boolean isAbstract()
isAbstract in interface ClassElementisAbstract in interface Elementpublic boolean isStatic()
public boolean isPublic()
public boolean isPrivate()
public boolean isFinal()
public boolean isProtected()
isProtected in interface Elementpublic Object getNativeType()
ElementgetNativeType in interface Elementpublic boolean isAssignable(String type)
ClassElementisAssignable in interface ClassElementtype - The type to checktrue if and only if the this type is assignable to the second