public class Metamodel
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static java.util.Set<java.lang.String> |
MODEL_CLASS_PACKAGES
qualified names of packages which contain classes (implementations) of spoon model
|
static java.util.Set<java.lang.String> |
MODEL_IFACE_PACKAGES
qualified names of packages which contain interfaces of spoon model
|
Modifier | Constructor and Description |
---|---|
protected |
Metamodel(Factory factory) |
|
Metamodel(java.io.File spoonJavaSourcesDirectory)
Not in the public API.
|
Modifier and Type | Method and Description |
---|---|
java.util.List<CtType<? extends CtElement>> |
getAllInstantiableMetamodelInterfaces() |
static java.util.Set<CtType<?>> |
getAllMetamodelInterfaces()
Returns all interfaces of the Spoon metamodel.
|
MetamodelConcept |
getConcept(java.lang.Class<? extends CtElement> clazz) |
static java.lang.String |
getConceptName(java.lang.Class<? extends CtElement> conceptClass) |
static java.lang.String |
getConceptName(CtType<?> type) |
java.util.Collection<MetamodelConcept> |
getConcepts() |
static CtClass<?> |
getImplementationOfInterface(CtInterface<?> iface) |
static Metamodel |
getInstance() |
static CtInterface<?> |
getInterfaceOfImplementation(CtClass<?> impl) |
static CtRole |
getRoleOfMethod(CtMethod<?> method) |
public static final java.util.Set<java.lang.String> MODEL_IFACE_PACKAGES
public static final java.util.Set<java.lang.String> MODEL_CLASS_PACKAGES
public Metamodel(java.io.File spoonJavaSourcesDirectory)
spoonJavaSourcesDirectory
- the root directory of java sources of spoon model.
The directory must contain "spoon" directory.protected Metamodel(Factory factory)
factory
- already loaded factory with all Spoon model typespublic static java.util.Set<CtType<?>> getAllMetamodelInterfaces()
public static Metamodel getInstance()
Metamodel
, which is built once and then returns cached versionpublic MetamodelConcept getConcept(java.lang.Class<? extends CtElement> clazz)
clazz
- a Class
of Spoon modelMetamodelConcept
which describes the `clazz`public java.util.Collection<MetamodelConcept> getConcepts()
MetamodelConcept
s of spoon meta modelpublic java.util.List<CtType<? extends CtElement>> getAllInstantiableMetamodelInterfaces()
public static java.lang.String getConceptName(CtType<?> type)
type
- a spoon model class or interface, whose concept name has to be returnedMetamodelConcept
, which represents Spoon model CtType
public static java.lang.String getConceptName(java.lang.Class<? extends CtElement> conceptClass)
public static CtClass<?> getImplementationOfInterface(CtInterface<?> iface)
iface
- the interface of spoon model elementCtClass
of Spoon model which implements the spoon model interface. null if there is no implementation.public static CtInterface<?> getInterfaceOfImplementation(CtClass<?> impl)
impl
- the implementation class of a Spoon elementCtInterface
of Spoon model which represents API of the spoon model class. null if there is no implementation.Copyright © 2007–2021 Inria. All rights reserved.