Class ObjectDef
java.lang.Object
io.micronaut.sourcegen.model.ObjectDef
- Direct Known Subclasses:
AnnotationObjectDef, ClassDef, EnumDef, InterfaceDef, RecordDef
public abstract sealed class ObjectDef
extends Object
permits ClassDef, EnumDef, InterfaceDef, RecordDef, AnnotationObjectDef
The abstract class representing a type: class, enum, interface or record.
- Since:
- 1.0
- Author:
- Denis Stepanov
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected final List<AnnotationDef> protected final ClassTypeDef.ClassNameprotected final Stringprotected final List<PropertyDef> protected final boolean -
Method Summary
Modifier and TypeMethodDescriptionGet the type definition for this type.final List<AnnotationDef> static TypeDefgetContextualType(@Nullable ObjectDef objectDef, TypeDef typeDef) Get a contextual type (converts this or super type to appropriate one).getContextualType(TypeDef typeDef) Get the actual contextual type.final Modifier[]final StringgetName()final Stringfinal List<PropertyDef> final Stringbooleanabstract ObjectDefwithClassName(ClassTypeDef.ClassName className) Creates a copy of this definition with a new class name.
-
Field Details
-
className
-
methods
-
properties
-
superinterfaces
-
innerTypes
-
name
-
modifiers
-
annotations
-
javadoc
-
synthetic
protected final boolean synthetic
-
-
Method Details
-
getMethods
-
getProperties
-
getSuperinterfaces
-
getPackageName
-
getSimpleName
-
getInnerTypes
-
withClassName
Creates a copy of this definition with a new class name.- Parameters:
className- The class name- Returns:
- the copy of this object definition with a new class name
- Since:
- 1.5
-
asTypeDef
-
getContextualType
-
getContextualType
-
isSynthetic
public boolean isSynthetic()- Returns:
- Is synthetic element
-
getName
-
getModifiers
-
getModifiersArray
-
getAnnotations
-
getJavadoc
-