This class defines the entry point API to create and access the program's
model. Element-specific methods are defined in the sub-factories. An instance
of the current factory can be retrieved at any place where a
spoon.processing.FactoryAccessor instance is available (that is to
say, any processor or model element). Factory methods ensure the model's
consistency and should be always used when creating model elements. The
spoon.reflect.CoreFactory is used to create raw elements, but model
consistency has to be maintained manually.
See Also:spoon.processing.Processor See Also:spoon.reflect.declaration.CtElement See Also:spoon.reflect.CoreFactory See Also:Factory.Core()
Converts an object o into an object or a
CtReference of type type.
< Parameters: T - >the actual type of the object Parameters: type - the type to convert the object into Parameters: o - the object to be converted a primitive object of type T, or a reference
Converts a collection of object into an array of type type.
< Parameters: T - >the actual type of the array Parameters: type - the type to convert the object into Parameters: val - the collection to be converted an array of type T
Gets the factory that was created at launching time (the firstly created
factory). This factory is automatically initialized when a factory is
contructed for the first time. Any subsequent constructions will not
affect the launching factory and references to other factories have to be
handled manually, if ever needed.