Package spoon.reflect
Interface CtModel
- All Superinterfaces:
CtQueryable
,Serializable
- All Known Implementing Classes:
CtModelImpl
represents a Java program, modeled by a set of compile-time (Ct) objects
where each object is a program element (for instance, a CtClass represents a class).
-
Method Summary
Modifier and TypeMethodDescriptionreturns all modules of the modelreturns all packages of the modelCollection<CtType<?>>
returns all top-level types of the modelgetElements(Filter<E> filter)
Returns all the model elements matching the filter.returns the root package of the unnamed moduleReturns the unnamed module.boolean
If true, the first build model has been finished.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.Methods inherited from interface spoon.reflect.visitor.chain.CtQueryable
filterChildren, map, map
-
Method Details
-
getRootPackage
CtPackage getRootPackage()returns the root package of the unnamed module -
getAllTypes
Collection<CtType<?>> getAllTypes()returns all top-level types of the model -
getAllPackages
Collection<CtPackage> getAllPackages()returns all packages of the model -
getUnnamedModule
CtModule getUnnamedModule()Returns the unnamed module. -
getAllModules
Collection<CtModule> getAllModules()returns all modules of the model -
processWith
process this model with the given processor -
getElements
Returns all the model elements matching the filter. -
isBuildModelFinished
boolean isBuildModelFinished()If true, the first build model has been finished. This value should be false at the beginning ofSpoonModelBuilder.build()
and true at this end. -
setBuildModelIsFinished
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()
-