public interface ClassElement extends TypedElement
CLASS_NAME_SUFFIX, EMPTY_METADATA, VALUE_MEMBER
EMPTY
Modifier and Type | Method and Description |
---|---|
default List<PropertyElement> |
getBeanProperties()
Returns the bean properties (getters and setters) for this class element.
|
default List<FieldElement> |
getFields()
Return all the fields of this class element.
|
default List<FieldElement> |
getFields(Predicate<Set<ElementModifier>> modifierFilter)
Return fields contained with the given modifiers include / exclude rules.
|
default Optional<ClassElement> |
getFirstTypeArgument() |
default String |
getPackageName()
The package name.
|
default Optional<ConstructorElement> |
getPrimaryConstructor()
Find and return a single primary constructor.
|
default String |
getSimpleName()
The simple name without the package name.
|
default Optional<ClassElement> |
getSuperType()
Returns the super type of this element or empty if the element has no super type.
|
default ClassElement |
getType() |
default Map<String,ClassElement> |
getTypeArguments() |
default Map<String,ClassElement> |
getTypeArguments(Class<?> type)
Get the type arguments for the given type name.
|
default Map<String,ClassElement> |
getTypeArguments(String type)
Get the type arguments for the given type name.
|
default boolean |
isAbstract() |
default boolean |
isArray()
Returns whether the class element is an array.
|
default boolean |
isAssignable(Class<?> type)
Tests whether one type is assignable to another.
|
boolean |
isAssignable(String type)
Tests whether one type is assignable to another.
|
default boolean |
isEnum()
Whether this element is an enum.
|
default boolean |
isInterface() |
default boolean |
isIterable() |
getGenericType, isPrimitive
annotate, annotate, annotate, annotate, getDocumentation, getName, 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
getAnnotationMetadata
boolean isAssignable(String type)
type
- The type to checktrue
if and only if the this type is assignable to the seconddefault boolean isEnum()
@Nonnull default Optional<ConstructorElement> getPrimaryConstructor()
Creator
or Inject
.default Optional<ClassElement> getSuperType()
@Nonnull default ClassElement getType()
getType
in interface TypedElement
default String getSimpleName()
getSimpleName
in interface Element
default String getPackageName()
default List<PropertyElement> getBeanProperties()
default List<FieldElement> getFields()
default List<FieldElement> getFields(@Nonnull Predicate<Set<ElementModifier>> modifierFilter)
modifierFilter
- Can be used to filter fields by modifierdefault boolean isAbstract()
isAbstract
in interface Element
default boolean isInterface()
default boolean isArray()
isArray
in interface TypedElement
default boolean isIterable()
@Nonnull default Map<String,ClassElement> getTypeArguments(@Nonnull String type)
type
- The type to retrieve type arguments for@Nonnull default Map<String,ClassElement> getTypeArguments(@Nonnull Class<?> type)
type
- The type to retrieve type arguments for@Nonnull default Map<String,ClassElement> getTypeArguments()
default Optional<ClassElement> getFirstTypeArgument()
default boolean isAssignable(Class<?> type)
type
- The type to checktrue
if and only if the this type is assignable to the second