Uses of Interface
spoon.reflect.declaration.CtClass
Package
Description
This root package provides the default integrated launchers for Spoon program processing.
Ready to go meta?
This package contains classes that model the Spoon metamodel itself.
This package contains the meta-model part that models the executable code (methods and constructors' bodies, field initializers).
This package contains the meta-model part that models the declarations (program's structures such as classes, fields, etc).
This package defines all the sub-factories for the Spoon meta-model.
This package defines visitor, scanner, and scanner-based query API for Java programs reified in the meta-model.
This package contains some default implementations for commonly used processing tasks.
This package defines the substitution and matching engines for Java templates.
This package defines a framework for well-typed pure-Java templates.
-
Uses of CtClass in spoon
Modifier and TypeMethodDescriptionstatic CtClass<?>
Launcher.parseClass(String code)
returns the AST of an inline class -
Uses of CtClass in spoon.metamodel
Modifier and TypeMethodDescriptionCtClass<?>
MetamodelConcept.getImplementationClass()
static @Nullable CtClass<?>
Metamodel.getImplementationOfInterface(CtInterface<?> iface)
Modifier and TypeMethodDescriptionstatic @Nullable CtInterface<?>
Metamodel.getInterfaceOfImplementation(CtClass<?> impl)
-
Uses of CtClass in spoon.reflect.code
Modifier and TypeMethodDescriptionCtClass<?>
CtNewClass.getAnonymousClass()
Gets the created class.Modifier and TypeMethodDescription<N extends CtNewClass>
NCtNewClass.setAnonymousClass(CtClass<?> anonymousClass)
Sets the created class. -
Uses of CtClass in spoon.reflect.declaration
Modifier and TypeInterfaceDescriptioninterface
This element represents an enumeration declaration.interface
This element represents a record declaration.Modifier and TypeMethodDescriptionCtClass.addAnonymousExecutable(CtAnonymousExecutable e)
Add an anonymous block to this class.CtClass.addConstructor(CtConstructor<T> constructor)
Adds a constructor to this class.CtClass.setAnonymousExecutables(List<CtAnonymousExecutable> e)
Sets the anonymous blocks of this class.CtClass.setConstructors(Set<CtConstructor<T>> constructors)
Sets the constructors for this class. -
Uses of CtClass in spoon.reflect.factory
Modifier and TypeMethodDescription<T> CtClass<T>
Creates a class from its qualified name.<T> CtClass<T>
Creates an inner class.<T> CtClass<T>
Creates a top-level class.<T> CtClass<T>
CoreFactory.createClass()
Creates a class.<T> CtClass<T>
Factory.createClass()
Factory.createClass(String qualifiedName)
Factory.createClass(CtClass<?> declaringClass, String simpleName)
Factory.createClass(CtPackage owner, String simpleName)
<T> CtClass<T>
FactoryImpl.createClass()
FactoryImpl.createClass(String qualifiedName)
FactoryImpl.createClass(CtClass<?> declaringClass, String simpleName)
FactoryImpl.createClass(CtPackage owner, String simpleName)
<T> CtClass<T>
Gets a class from its runtime Java class.<T> CtClass<T>
Searches for a class from his qualified name.Modifier and TypeMethodDescription<T> CtClass<T>
Creates an inner class.<T> CtConstructor<T>
ConstructorFactory.create(CtClass<T> target, Set<ModifierKind> modifiers, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes)
Creates an empty constructor.<T> CtConstructor<T>
ConstructorFactory.create(CtClass<T> target, Set<ModifierKind> modifiers, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes, CtBlock<T> body)
Creates a constructor.<T> CtConstructor<T>
ConstructorFactory.create(CtClass<T> target, CtConstructor<?> source)
Copies a constructor into a target class.<T> CtConstructor<T>
Creates a constructor into a target class by copying it from a source method.<R, B extends R>
CtMethod<R>MethodFactory.create(CtClass<?> target, Set<ModifierKind> modifiers, CtTypeReference<R> returnType, String name, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes, CtBlock<B> body)
Creates a method.ExecutableFactory.createAnonymous(CtClass<?> target, CtBlock<Void> body)
Creates an anonymous executable (initializer block) in a target class).Factory.createAnonymous(CtClass<?> target, CtBlock<Void> body)
FactoryImpl.createAnonymous(CtClass<?> target, CtBlock<Void> body)
Factory.createClass(CtClass<?> declaringClass, String simpleName)
FactoryImpl.createClass(CtClass<?> declaringClass, String simpleName)
Factory.createConstructor(CtClass target, Set<ModifierKind> modifiers, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes)
Factory.createConstructor(CtClass target, Set<ModifierKind> modifiers, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes, CtBlock body)
Factory.createConstructor(CtClass target, CtConstructor<?> source)
Factory.createConstructor(CtClass target, CtMethod<?> source)
FactoryImpl.createConstructor(CtClass target, Set<ModifierKind> modifiers, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes)
FactoryImpl.createConstructor(CtClass target, Set<ModifierKind> modifiers, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes, CtBlock body)
FactoryImpl.createConstructor(CtClass target, CtConstructor<?> source)
FactoryImpl.createConstructor(CtClass target, CtMethod<?> source)
<T> CtConstructor<T>
ConstructorFactory.createDefault(CtClass<T> target)
Create the default empty constructor.<T> CtConstructor<T>
Factory.createDefault(CtClass<T> target)
<T> CtConstructor<T>
FactoryImpl.createDefault(CtClass<T> target)
Factory.createMethod(CtClass<?> target, Set<ModifierKind> modifiers, CtTypeReference returnType, String name, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes, CtBlock body)
FactoryImpl.createMethod(CtClass<?> target, Set<ModifierKind> modifiers, CtTypeReference returnType, String name, List<CtParameter<?>> parameters, Set<CtTypeReference<? extends Throwable>> thrownTypes, CtBlock body)
-
Uses of CtClass in spoon.reflect.visitor
Modifier and TypeMethodDescription<T> void
CtAbstractVisitor.visitCtClass(CtClass<T> ctClass)
<T> void
CtBiScannerDefault.visitCtClass(CtClass<T> ctClass)
<T> void
CtInheritanceScanner.visitCtClass(CtClass<T> e)
<T> void
CtScanner.visitCtClass(CtClass<T> ctClass)
<T> void
CtVisitor.visitCtClass(CtClass<T> ctClass)
Visits a class declaration.<T> void
DefaultJavaPrettyPrinter.visitCtClass(CtClass<T> ctClass)
<T> void
ImportScannerImpl.visitCtClass(CtClass<T> ctClass)
-
Uses of CtClass in spoon.support
-
Uses of CtClass in spoon.support.compiler.jdt
-
Uses of CtClass in spoon.support.reflect.code
Modifier and TypeMethodDescription<N extends CtNewClass>
NCtNewClassImpl.setAnonymousClass(CtClass<?> anonymousClass)
-
Uses of CtClass in spoon.support.reflect.declaration
Modifier and TypeClassDescriptionclass
CtClassImpl<T>
The implementation forCtClass
.class
CtEnumImpl<T extends Enum<?>>
class
Modifier and TypeMethodDescriptionCtClassImpl.addAnonymousExecutable(CtAnonymousExecutable e)
CtClassImpl.addConstructor(CtConstructor<T> constructor)
CtClassImpl.setAnonymousExecutables(List<CtAnonymousExecutable> anonymousExecutables)
CtClassImpl.setConstructors(Set<CtConstructor<T>> constructors)
Modifier and TypeMethodDescriptionCtClassImpl.addPermittedType(CtTypeReference<?> type)
CtClassImpl.clone()
CtClassImpl.removePermittedType(CtTypeReference<?> type)
CtClassImpl.setPermittedTypes(Collection<CtTypeReference<?>> permittedTypes)
-
Uses of CtClass in spoon.support.template
Modifier and TypeMethodDescriptionGets the names of all the template parameters of a given template type (including the ones defined by the super types).Parameters.getNamesToValues(Template<?> template, CtClass<? extends Template<?>> templateType)
Gets the Map of names to template parameter value for all the template parameters of a given template type (including the ones defined by the super types).static CtField<?>
Parameters.getParameterField(CtClass<? extends Template<?>> templateClass, String parameterName)
-
Uses of CtClass in spoon.support.visitor
Modifier and TypeMethodDescription<T> void
TypeReferenceScanner.visitCtClass(CtClass<T> ctClass)
-
Uses of CtClass in spoon.support.visitor.clone
-
Uses of CtClass in spoon.support.visitor.replace
-
Uses of CtClass in spoon.template
Modifier and TypeMethodDescriptionstatic <T> CtClass<T>
Substitution.getTemplateCtClass(Factory factory, Template<?> template)
Modifier and TypeMethodDescriptionstatic CtBlock<?>
BlockTemplate.getBlock(CtClass<? extends BlockTemplate> p)
Returns the block.static <T> CtExpression<T>
ExpressionTemplate.getExpression(CtClass<? extends ExpressionTemplate<?>> p)
Returns the expression.static <T> CtConstructor<T>
Substitution.insertConstructor(CtClass<T> targetClass, Template<?> template, CtConstructor<?> sourceConstructor)
Generates a constructor from a template constructor by substituting all the template parameters by their values.static <T> CtConstructor<T>
Substitution.insertConstructor(CtClass<T> targetClass, Template<?> template, CtMethod<?> sourceMethod)
Generates a constructor from a template method by substituting all the template parameters by their values.static CtBlock<?>
Substitution.substituteMethodBody(CtClass<?> targetClass, Template<?> template, String executableName, CtTypeReference<?>... parameterTypes)
Gets a body from a template executable with all the template parameters substituted.static CtStatement
Substitution.substituteStatement(CtClass<?> targetClass, Template<?> template, int statementIndex, String executableName, CtTypeReference<?>... parameterTypes)
Gets a statement from a template executable with all the template parameters substituted.ModifierConstructorDescriptionTemplateMatcher(CtElement templateRoot, CtClass<?> templateType)
Constructs a matcher for a given template.