Package org.openflexo.pamela
Class PamelaMetaModel
- java.lang.Object
-
- org.openflexo.pamela.PamelaMetaModel
-
public class PamelaMetaModel extends java.lang.Object
APamelaMetaModel
represents a PAMELA meta-model dynamically infered from the exploration of compiled code
Build and access to aPamelaMetaModel
should be performed using API provided byPamelaMetaModelLibrary
-
-
Constructor Summary
Constructors Constructor Description PamelaMetaModel(java.lang.Class<?> baseClass, java.util.List<PamelaMetaModel> metaModels)
PamelaMetaModel(java.lang.Class<?> baseClass, PamelaMetaModel... metaModels)
PamelaMetaModel(java.util.List<java.lang.Class<?>> baseClasses)
PamelaMetaModel(PamelaMetaModel... metaModels)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addExecutionMonitor(ExecutionMonitor m)
java.lang.String
debug()
java.lang.Class<?>
getBaseClass()
java.util.Iterator<ModelEntity>
getEntities()
int
getEntityCount()
java.util.Set<ExecutionMonitor>
getExecutionMonitors()
<I> ModelEntity<I>
getModelEntity(java.lang.Class<I> implementedInterface)
ModelEntity<?>
getModelEntity(java.lang.String xmlElementName)
<P extends PatternDefinition>
java.util.List<P>getPatternDefinitions(java.lang.Class<P> patternDefinitionClass)
java.util.Set<PatternInstance<?>>
getPatternInstances(java.lang.Object stakeholder)
<P extends PatternDefinition>
java.util.Set<PatternInstance<P>>getPatternInstances(P patternDefinition)
<I> ModelPropertyXMLTag<I>
getPropertyForXMLTag(ModelEntity<I> entity, PamelaModelFactory pamelaModelFactory, java.lang.String xmlTag)
Return the appropriateModelPropertyXMLTag
matching searched XML Tag, supplied as parameter (xmlTag).
Note that required parameters include the entity which gives the context where such XML tag is to be looked-up, and thePamelaModelFactory
to use.
TODO: Also note that this implementation is not safe when using multiple factories, because caching is performed whithout taking modelFactory under account.java.util.List<ModelEntity<?>>
getUpperEntities(java.lang.Object object)
boolean
isMethodInvolvedInPattern(java.lang.reflect.Method method)
<I> void
notifiedNewInstance(I newInstance, ModelEntity<I> modelEntity)
<P extends PatternDefinition>
voidregisterPatternInstance(PatternInstance<P> patternInstance)
void
registerStakeHolderForPatternInstance(java.lang.Object stakeHolder, java.lang.String role, PatternInstance<?> patternInstance)
boolean
removeExecutionMonitor(ExecutionMonitor m)
-
-
-
Constructor Detail
-
PamelaMetaModel
public PamelaMetaModel(java.lang.Class<?> baseClass, java.util.List<PamelaMetaModel> metaModels) throws ModelDefinitionException
- Throws:
ModelDefinitionException
-
PamelaMetaModel
public PamelaMetaModel(java.util.List<java.lang.Class<?>> baseClasses) throws ModelDefinitionException
- Throws:
ModelDefinitionException
-
PamelaMetaModel
public PamelaMetaModel(PamelaMetaModel... metaModels) throws ModelDefinitionException
- Throws:
ModelDefinitionException
-
PamelaMetaModel
public PamelaMetaModel(java.lang.Class<?> baseClass, PamelaMetaModel... metaModels) throws ModelDefinitionException
- Throws:
ModelDefinitionException
-
-
Method Detail
-
getBaseClass
public java.lang.Class<?> getBaseClass()
-
getModelEntity
public ModelEntity<?> getModelEntity(java.lang.String xmlElementName)
-
getEntities
public java.util.Iterator<ModelEntity> getEntities()
-
getEntityCount
public int getEntityCount()
-
getModelEntity
public <I> ModelEntity<I> getModelEntity(java.lang.Class<I> implementedInterface)
-
getPropertyForXMLTag
public <I> ModelPropertyXMLTag<I> getPropertyForXMLTag(ModelEntity<I> entity, PamelaModelFactory pamelaModelFactory, java.lang.String xmlTag) throws ModelDefinitionException
Return the appropriateModelPropertyXMLTag
matching searched XML Tag, supplied as parameter (xmlTag).
Note that required parameters include the entity which gives the context where such XML tag is to be looked-up, and thePamelaModelFactory
to use.
TODO: Also note that this implementation is not safe when using multiple factories, because caching is performed whithout taking modelFactory under account.- Parameters:
entity
-pamelaModelFactory
-xmlTag
-- Returns:
- Throws:
ModelDefinitionException
-
getUpperEntities
public java.util.List<ModelEntity<?>> getUpperEntities(java.lang.Object object)
-
debug
public java.lang.String debug()
-
addExecutionMonitor
public void addExecutionMonitor(ExecutionMonitor m)
-
getExecutionMonitors
public java.util.Set<ExecutionMonitor> getExecutionMonitors()
-
removeExecutionMonitor
public boolean removeExecutionMonitor(ExecutionMonitor m)
-
getPatternDefinitions
public <P extends PatternDefinition> java.util.List<P> getPatternDefinitions(java.lang.Class<P> patternDefinitionClass)
-
notifiedNewInstance
public <I> void notifiedNewInstance(I newInstance, ModelEntity<I> modelEntity)
-
isMethodInvolvedInPattern
public boolean isMethodInvolvedInPattern(java.lang.reflect.Method method)
-
registerPatternInstance
public <P extends PatternDefinition> void registerPatternInstance(PatternInstance<P> patternInstance)
-
registerStakeHolderForPatternInstance
public void registerStakeHolderForPatternInstance(java.lang.Object stakeHolder, java.lang.String role, PatternInstance<?> patternInstance)
-
getPatternInstances
public java.util.Set<PatternInstance<?>> getPatternInstances(java.lang.Object stakeholder)
-
getPatternInstances
public <P extends PatternDefinition> java.util.Set<PatternInstance<P>> getPatternInstances(P patternDefinition)
-
-