@Internal public class JavaClassElement extends AbstractJavaElement implements ClassElement
TypeElement
.CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier and Type | Method and Description |
---|---|
AnnotationMetadata |
getAnnotationMetadata()
Supplies the metadata.
|
List<PropertyElement> |
getBeanProperties()
Returns the bean properties (getters and setters) for this class element.
|
List<FieldElement> |
getFields(Predicate<Set<ElementModifier>> modifierFilter)
Return fields contained with the given modifiers include / exclude rules.
|
String |
getName() |
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 |
isInterface() |
boolean |
isPrimitive()
Whether the type is primitive.
|
annotate, getNativeType, isFinal, isPrivate, isProtected, isPublic, isStatic, mirrorToClassElement, mirrorToClassElement, parameterizedClassElement, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getFields, getFirstTypeArgument, getPackageName, getSimpleName, getType, getTypeArguments, isAssignable, isEnum, isIterable
getGenericType
annotate, annotate, annotate, annotate, getDocumentation, getNativeType, isFinal, isPrivate, isProtected, isPublic, isStatic
booleanValue, 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, 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, synthesizeDeclaredAnnotationsByType
@Nonnull public Map<String,ClassElement> getTypeArguments(@Nonnull String type)
ClassElement
getTypeArguments
in interface ClassElement
type
- The type to retrieve type arguments forpublic boolean isPrimitive()
TypedElement
isPrimitive
in interface TypedElement
public Optional<ClassElement> getSuperType()
ClassElement
getSuperType
in interface ClassElement
public boolean isAbstract()
isAbstract
in interface ClassElement
isAbstract
in interface Element
isAbstract
in class AbstractJavaElement
public boolean isInterface()
isInterface
in interface ClassElement
public List<PropertyElement> getBeanProperties()
ClassElement
getBeanProperties
in interface ClassElement
public List<FieldElement> getFields(@Nonnull Predicate<Set<ElementModifier>> modifierFilter)
ClassElement
getFields
in interface ClassElement
modifierFilter
- Can be used to filter fields by modifierpublic boolean isArray()
ClassElement
isArray
in interface ClassElement
isArray
in interface TypedElement
public String getName()
getName
in interface Element
getName
in class AbstractJavaElement
public boolean isAssignable(String type)
ClassElement
isAssignable
in interface ClassElement
type
- The type to checktrue
if and only if the this type is assignable to the secondpublic AnnotationMetadata getAnnotationMetadata()
AnnotationMetadataProvider
AnnotationMetadata.EMPTY_METADATA
.getAnnotationMetadata
in interface AnnotationMetadataProvider
getAnnotationMetadata
in class AbstractJavaElement
AnnotationMetadata
@Nonnull public Optional<ConstructorElement> getPrimaryConstructor()
ClassElement
Creator
or Inject
.getPrimaryConstructor
in interface ClassElement
@Nonnull public Map<String,ClassElement> getTypeArguments()
getTypeArguments
in interface ClassElement