Package spoon.reflect
Class CtModelImpl
- java.lang.Object
-
- spoon.reflect.CtModelImpl
-
- All Implemented Interfaces:
Serializable
,CtModel
,CtQueryable
public class CtModelImpl extends Object implements CtModel
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CtModelImpl.CtRootPackage
-
Constructor Summary
Constructors Constructor Description CtModelImpl(Factory f)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <R extends CtElement>
CtQueryfilterChildren(Filter<R> filter)
Collection<CtModule>
getAllModules()
returns all modules of the modelCollection<CtPackage>
getAllPackages()
returns all packages of the modelCollection<CtType<?>>
getAllTypes()
returns all top-level types of the model<E extends CtElement>
List<E>getElements(Filter<E> filter)
Returns all the model elements matching the filter.CtPackage
getRootPackage()
returns the root package of the unnamed moduleCtModule
getUnnamedModule()
Returns the unnamed module.boolean
isBuildModelFinished()
If true, the first build model has been finished.<I> CtQuery
map(CtConsumableFunction<I> queryStep)
<I,R>
CtQuerymap(CtFunction<I,R> function)
void
processWith(Processor<?> processor)
process this model with the given processor<T extends CtModel>
TsetBuildModelIsFinished(boolean buildModelFinished)
Set to true to flag that a build model has been finished.
-
-
-
Constructor Detail
-
CtModelImpl
public CtModelImpl(Factory f)
-
-
Method Detail
-
filterChildren
public <R extends CtElement> CtQuery filterChildren(Filter<R> filter)
- Specified by:
filterChildren
in interfaceCtQueryable
- See Also:
CtQuery.filterChildren(Filter)
-
map
public <I,R> CtQuery map(CtFunction<I,R> function)
- Specified by:
map
in interfaceCtQueryable
- See Also:
CtQuery.map(CtFunction)
-
map
public <I> CtQuery map(CtConsumableFunction<I> queryStep)
- Specified by:
map
in interfaceCtQueryable
- See Also:
CtQuery.map(CtConsumableFunction)
-
getRootPackage
public CtPackage getRootPackage()
Description copied from interface:CtModel
returns the root package of the unnamed module- Specified by:
getRootPackage
in interfaceCtModel
-
getAllTypes
public Collection<CtType<?>> getAllTypes()
Description copied from interface:CtModel
returns all top-level types of the model- Specified by:
getAllTypes
in interfaceCtModel
-
getAllPackages
public Collection<CtPackage> getAllPackages()
Description copied from interface:CtModel
returns all packages of the model- Specified by:
getAllPackages
in interfaceCtModel
-
getUnnamedModule
public CtModule getUnnamedModule()
Description copied from interface:CtModel
Returns the unnamed module.- Specified by:
getUnnamedModule
in interfaceCtModel
-
getAllModules
public Collection<CtModule> getAllModules()
Description copied from interface:CtModel
returns all modules of the model- Specified by:
getAllModules
in interfaceCtModel
-
processWith
public void processWith(Processor<?> processor)
Description copied from interface:CtModel
process this model with the given processor- Specified by:
processWith
in interfaceCtModel
-
getElements
public <E extends CtElement> List<E> getElements(Filter<E> filter)
Description copied from interface:CtModel
Returns all the model elements matching the filter.- Specified by:
getElements
in interfaceCtModel
-
isBuildModelFinished
public boolean isBuildModelFinished()
Description copied from interface:CtModel
If true, the first build model has been finished. This value should be false at the beginning ofSpoonModelBuilder.build()
and true at this end.- Specified by:
isBuildModelFinished
in interfaceCtModel
-
setBuildModelIsFinished
public <T extends CtModel> T setBuildModelIsFinished(boolean buildModelFinished)
Description copied from interface:CtModel
Set to true to flag that a build model has been finished. By default, this method is called with a true value at the end ofSpoonModelBuilder.build()
- Specified by:
setBuildModelIsFinished
in interfaceCtModel
-
-