Package spoon.reflect.declaration
This package contains the meta-model part that models the declarations (program's structures such as classes, fields, etc).
Related Documentation
-
Interface Summary Interface Description CtAnnotation<A extends Annotation> This element represents an annotation on an element.CtAnnotationMethod<T> This element defines an annotation method declared in an annotation type.CtAnnotationType<T extends Annotation> This element defines an annotation type.CtAnonymousExecutable This element defines an anonymous executable block declaration in a class.CtClass<T> This element represents a class declaration.CtCodeSnippet This interface represents snippets of source code that can be used in the AST to represent complex code without having to build the corresponding program model structure.CtCompilationUnit Defines a compilation unit.CtConstructor<T> This element defines a constructor declaration.CtElement This interface is the root interface for the metamodel elements (any program element).CtEnum<T extends Enum<?>> This element represents an enumeration declaration.CtEnumValue<T> Corresponds to one enum value specified in an enumeration.CtExecutable<R> This element represents an executable element such as a method, a constructor, or an anonymous block.CtField<T> This element defines a field declaration.CtFormalTypeDeclarer This abstract element defines a declaration that accepts formal type parameters (aka generics), such as a CtType (class A<E>
), CtMethod or CtConstructor.CtImport This element represents an import declaration.CtInterface<T> This element defines an interface declaration.CtMethod<T> This element defines a method declaration.CtModifiable This interface defines an element that accepts modifiers.CtModule Represents a Java module as defined in Java 9.CtModuleDirective Represents a directive of aCtModule
The directives of a module declaration specify the module's dependences on other modulesCtModuleRequirement
, the packages it makes available to other modulesCtPackageExport
, the services it consumesCtUsedService
, and the services it providesCtProvidedService
.CtModuleRequirement Represents a require module in a Java module definition The requires directive specifies the name of a module on which the current module has a dependence.CtMultiTypedElement Defined an element with several types.CtNamedElement Declares an element that has a name (a class, a method, a variable, etc).CtPackage This element defines a package declaration.CtPackageDeclaration This element represents an package declaration.CtPackageExport Represents an exported or opened package in a Java module The exports directive specifies the name of a package to be exported by the current module.CtParameter<T> This element defines an executable parameter declaration.CtProvidedService Represents a provided service in aCtModule
.CtShadowable A shadow element is an element that is in the Spoon model, but does not exist in the actual source code.CtType<T> This abstract element defines a super-type for classes and interfaces, which can declare methods.CtTypedElement<T> This abstract element defines a typed element.CtTypeInformation Returns information that can be obtained both at compile-time and run-time For CtElement, the compile-time information is given For CtTypeReference, the runtime information is given (using the Reflection API)CtTypeMember This interface represents a member of a class (field, method, nested class or static/instance initializer).CtTypeParameter This element defines a declaration of a type parameter (aka generics).CtUsedService Represents the declaration of a used service in aCtModule
The uses directive specifies a service for which the current module may discover providers via java.util.ServiceLoader.CtVariable<T> This abstract element defines a variable declaration. -
Enum Summary Enum Description CtAnnotatedElementType This enum specifies the element type which is annotated by the annotationCtCompilationUnit.UNIT_TYPE CtImportKind CtModuleRequirement.RequiresModifier ModifierKind Represents a modifier on the declaration of a program element such as a class, method, or field. -
Exception Summary Exception Description ParentNotInitializedException This exception is thrown when the parent of an element has not been correctly initialized.