Uses of Interface
spoon.reflect.factory.Factory
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 core API for code processing.
This package defines the Spoon's compile-time meta-model of Java programs.
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 provides an implementation of the spoon.reflect package.
This package defines the substitution and matching engines for Java templates.
This package defines a framework for well-typed pure-Java templates.
-
Uses of Factory in spoon
Modifier and TypeMethodDescriptionLauncher.createFactory()
SpoonAPI.createFactory()
Creates a new Spoon factory (may be overridden)Launcher.getFactory()
SpoonAPI.getFactory()
Returns the current factorySpoonModelBuilder.getFactory()
Returns the working factoryModifier and TypeMethodDescriptionLauncher.createCompiler(Factory factory)
Creates a new Spoon Java compiler in order to process and compile Java source code.Launcher.createCompiler(Factory factory, List<SpoonResource> inputSources)
Launcher.createCompiler(Factory factory, List<SpoonResource> inputSources, List<SpoonResource> templateSources)
Creates a new Spoon Java compiler in order to process and compile Java source code.protected SpoonModelBuilder
Launcher.getCompilerInstance(Factory factory)
Instantiates the compiler. -
Uses of Factory in spoon.metamodel
-
Uses of Factory in spoon.pattern
Modifier and TypeMethodDescriptionGenerator.getFactory()
protected Factory
PatternBuilder.getFactory()
-
Uses of Factory in spoon.pattern.internal
Modifier and TypeMethodDescription<T> T
ValueConvertor.getValueAs(Factory factory, String parameterName, Object value, Class<T> valueClass)
<T> T
ValueConvertorImpl.getValueAs(Factory factory, String parameterName, Object value, Class<T> valueClass)
-
Uses of Factory in spoon.pattern.internal.parameter
Modifier and TypeMethodDescriptionprotected <T> T
AbstractParameterInfo.convertSingleValue(Factory factory, Object value, Class<T> type)
protected <T> void
AbstractParameterInfo.convertValue(Factory factory, ResultHolder<T> result, Object rawValue)
<T> void
AbstractParameterInfo.getValueAs(Factory factory, ResultHolder<T> result, ImmutableMap parameters)
<T> void
ComputedParameterInfo.getValueAs(Factory factory, ResultHolder<T> result, ImmutableMap parameters)
<T> void
ParameterInfo.getValueAs(Factory factory, ResultHolder<T> result, ImmutableMap parameters)
Takes the value of parameter identified by thisParameterInfo
from the `parameters` and adds that 0, 1 or more values into result (depending on type of result) -
Uses of Factory in spoon.processing
Modifier and TypeMethodDescriptionAbstractManualProcessor.getFactory()
AbstractProcessor.getFactory()
FactoryAccessor.getFactory()
Gets the factory of this object.Modifier and TypeMethodDescriptionvoid
AbstractManualProcessor.setFactory(Factory factory)
void
AbstractProcessor.setFactory(Factory factory)
void
FactoryAccessor.setFactory(Factory factory)
Sets the factory object. -
Uses of Factory in spoon.reflect
Modifier and TypeMethodDescriptionModelStreamer.load(InputStream in)
Loads a factory (and all its associated Java program elements).Modifier and TypeMethodDescriptionvoid
ModelStreamer.save(Factory f, OutputStream out)
Saves a factory (and all its associated Java program elements). -
Uses of Factory in spoon.reflect.factory
Modifier and TypeMethodDescriptionCoreFactory.getMainFactory()
Gets the main factory of that core factory (cannot benull
).Factory.Templates()
Access to templatesFactoryImpl.Templates()
Modifier and TypeMethodDescriptionvoid
CoreFactory.setMainFactory(Factory mainFactory)
Sets the main factory of that core factory.ModifierConstructorDescriptionAnnotationFactory(Factory factory)
Creates an annotation sub-factory.ClassFactory(Factory factory)
Creates a class sub-factory.CodeFactory(Factory factory)
Creates aCtCodeElement
sub-factory.CompilationUnitFactory(Factory factory)
Creates the evaluation factory.ConstructorFactory(Factory factory)
Creates a new constructor sub-factory.EnumFactory(Factory factory)
Creates a new enum sub-factory.EvalFactory(Factory factory)
Creates the evaluation factory.ExecutableFactory(Factory factory)
Creates a new executable sub-factory.FieldFactory(Factory factory)
Creates a new field sub-factory.InterfaceFactory(Factory factory)
Creates a new interface sub-factory.MethodFactory(Factory factory)
Creates a new method sub-factory.ModuleFactory(Factory factory)
PackageFactory(Factory factory)
Creates a new package sub-factory.QueryFactory(Factory factory)
Creates the evaluation factory.SubFactory(Factory factory)
The sub-factory constructor takes an instance of the parent factory.TypeFactory(Factory factory)
Creates a new type sub-factory. -
Uses of Factory in spoon.reflect.visitor
Modifier and TypeMethodDescriptionQuery.getElements(Factory factory, Filter<E> filter)
Within a given factory, returns all the program elements that match the filter.static <R extends CtReference>
List<R>Query.getReferences(Factory factory, Filter<R> filter)
Within a given factory, returns all the program element references that match the filter.void
ElementPrinterHelper.writeAnnotationElement(Factory factory, Object value)
Writes an annotation element. -
Uses of Factory in spoon.support
Modifier and TypeMethodDescriptionQueueProcessingManager.getFactory()
RuntimeProcessingManager.getFactory()
DefaultCoreFactory.getMainFactory()
SerializationModelStreamer.load(InputStream in)
Modifier and TypeMethodDescriptionvoid
SerializationModelStreamer.save(Factory f, OutputStream out)
void
QueueProcessingManager.setFactory(Factory factory)
void
RuntimeProcessingManager.setFactory(Factory factory)
void
DefaultCoreFactory.setMainFactory(Factory mainFactory)
ModifierConstructorDescriptionQueueProcessingManager(Factory factory)
Creates a new processing manager that maintains a queue of processors to be applied to a given factory.RuntimeProcessingManager(Factory factory)
Creates a new processing manager that maintains a queue of processors to be applied to a given factory. -
Uses of Factory in spoon.support.compiler.jdt
Modifier and TypeMethodDescriptionprotected void
JDTBasedSpoonCompiler.buildModel(org.eclipse.jdt.internal.compiler.ast.CompilationUnitDeclaration[] units, Factory aFactory)
ModifierConstructorDescriptionJDTBasedSpoonCompiler(Factory factory)
Default constructorJDTSnippetCompiler(Factory factory, String contents)
JDTTreeBuilder(Factory factory)
-
Uses of Factory in spoon.support.gui
-
Uses of Factory in spoon.support.reflect
-
Uses of Factory in spoon.support.reflect.declaration
Modifier and TypeFieldDescriptionprotected Factory
CtElementImpl.factory
this field `factory` must be transient in order to allow proper serialization the factory is restored in all AST nodes inSerializationModelStreamer
-
Uses of Factory in spoon.support.template
Modifier and TypeMethodDescriptionParameters.getAllTemplateParameterFields(Class<? extends Template<?>> clazz, Factory factory)
returns all the compile_time fields of a template representing a template parameterParameters.getTemplateParametersAsMap(Factory f, Template<?> template)
Gets the Map of names to template parameter values for all the template parameters of a given template type + adds mapping of template model reference to target type as parameter too -
Uses of Factory in spoon.support.util
Modifier and TypeMethodDescriptionstatic Collection<CtExecutableReference<?>>
RtHelper.getAllExecutables(Class<?> clazz, Factory factory)
return all executables of this classstatic Collection<CtFieldReference<?>>
RtHelper.getAllFields(Class<?> c, Factory factory)
Gets all the field references for a given class (including the superclasses'). -
Uses of Factory in spoon.support.visitor
-
Uses of Factory in spoon.support.visitor.java
-
Uses of Factory in spoon.template
Modifier and TypeMethodDescriptionAbstractTemplate.getFactory()
returns a Spoon factory object from the first template parameter that contains oneModifier and TypeMethodDescriptionstatic <T> CtClass<T>
Substitution.getTemplateCtClass(Factory factory, Template<?> template)
-
Uses of Factory in spoon.testing.utils
Modifier and TypeMethodDescriptionstatic Factory
Builds the Spoon mode of the `filesToBuild` given as parameterstatic Factory
Utility method for testing: creates the model of the given `classesToBuild` from src/test/java and returns the factorystatic Factory
Utility method for testing: creates the model of the given `classesToBuild` from src/test/java and returns the factory and allows to configure the Launcher first using `config`static Factory
ModelUtils.buildNoClasspath(Class<?>... classesToBuild)
Utility method for testing: creates the noclasspath model of the given `classesToBuild` from src/test/java and returns the factorystatic Factory
ModelUtils.createFactory()
Modifier and TypeMethodDescriptionstatic <T extends CtType<?>>
TUtility method for testing: creates the model of `packageName` and the factory from src/test/java and returns the CtType corresponding to `className`static void
ProcessorUtils.process(Factory factory, Collection<Processor<?>> processors)