Uses of Interface
spoon.reflect.declaration.CtClass
Packages that use 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
Methods in spoon.metamodel that return CtClassModifier and TypeMethodDescriptionCtClass<?>
MetamodelConcept.getImplementationClass()
static @Nullable CtClass<?>
Metamodel.getImplementationOfInterface(CtInterface<?> iface)
Methods in spoon.metamodel with parameters of type CtClassModifier and TypeMethodDescriptionstatic @Nullable CtInterface<?>
Metamodel.getInterfaceOfImplementation(CtClass<?> impl)
-
Uses of CtClass in spoon.reflect.code
Methods in spoon.reflect.code that return CtClassModifier and TypeMethodDescriptionCtClass<?>
CtNewClass.getAnonymousClass()
Gets the created class.Methods in spoon.reflect.code with parameters of type CtClassModifier and TypeMethodDescription<N extends CtNewClass>
NCtNewClass.setAnonymousClass(CtClass<?> anonymousClass)
Sets the created class. -
Uses of CtClass in spoon.reflect.declaration
Subinterfaces of CtClass in spoon.reflect.declarationModifier and TypeInterfaceDescriptioninterface
This element represents an enumeration declaration.interface
This element represents a record declaration.Methods in spoon.reflect.declaration with type parameters of type CtClassModifier 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.Methods in spoon.reflect.declaration that return CtClass -
Uses of CtClass in spoon.reflect.factory
Methods in spoon.reflect.factory that return CtClassModifier 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.Methods in spoon.reflect.factory with parameters of type CtClassModifier 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
Methods in spoon.reflect.visitor with parameters of type CtClassModifier 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
Methods in spoon.support that return CtClass -
Uses of CtClass in spoon.support.compiler.jdt
Methods in spoon.support.compiler.jdt with parameters of type CtClass -
Uses of CtClass in spoon.support.reflect.code
Methods in spoon.support.reflect.code that return CtClassMethods in spoon.support.reflect.code with parameters of type CtClassModifier and TypeMethodDescription<N extends CtNewClass>
NCtNewClassImpl.setAnonymousClass(CtClass<?> anonymousClass)
-
Uses of CtClass in spoon.support.reflect.declaration
Classes in spoon.support.reflect.declaration that implement CtClassModifier and TypeClassDescriptionclass
CtClassImpl<T>
The implementation forCtClass
.class
CtEnumImpl<T extends Enum<?>>
class
Methods in spoon.support.reflect.declaration with type parameters of type CtClassModifier and TypeMethodDescriptionCtClassImpl.addAnonymousExecutable(CtAnonymousExecutable e)
CtClassImpl.addConstructor(CtConstructor<T> constructor)
CtClassImpl.setAnonymousExecutables(List<CtAnonymousExecutable> anonymousExecutables)
CtClassImpl.setConstructors(Set<CtConstructor<T>> constructors)
Methods in spoon.support.reflect.declaration that return CtClassModifier and TypeMethodDescriptionCtClassImpl.addPermittedType(CtTypeReference<?> type)
CtClassImpl.clone()
CtClassImpl.removePermittedType(CtTypeReference<?> type)
CtClassImpl.setPermittedTypes(Collection<CtTypeReference<?>> permittedTypes)
-
Uses of CtClass in spoon.support.template
Methods in spoon.support.template with parameters of type CtClassModifier 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
Methods in spoon.support.visitor with parameters of type CtClassModifier and TypeMethodDescription<T> void
TypeReferenceScanner.visitCtClass(CtClass<T> ctClass)
-
Uses of CtClass in spoon.support.visitor.clone
Methods in spoon.support.visitor.clone with parameters of type CtClass -
Uses of CtClass in spoon.support.visitor.replace
Methods in spoon.support.visitor.replace with parameters of type CtClass -
Uses of CtClass in spoon.template
Methods in spoon.template that return CtClassModifier and TypeMethodDescriptionstatic <T> CtClass<T>
Substitution.getTemplateCtClass(Factory factory, Template<?> template)
Methods in spoon.template with parameters of type CtClassModifier 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.Constructors in spoon.template with parameters of type CtClassModifierConstructorDescriptionTemplateMatcher(CtElement templateRoot, CtClass<?> templateType)
Constructs a matcher for a given template.