Package org.openflexo.pamela
Class PamelaMetaModel
- java.lang.Object
-
- org.openflexo.pamela.PamelaMetaModel
-
public class PamelaMetaModel extends java.lang.ObjectAPamelaMetaModelrepresents a PAMELA meta-model dynamically infered from the exploration of compiled code
Build and access to aPamelaMetaModelshould 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 voidaddExecutionMonitor(ExecutionMonitor m)java.lang.Stringdebug()java.lang.Class<?>getBaseClass()java.util.Iterator<ModelEntity>getEntities()intgetEntityCount()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 appropriateModelPropertyXMLTagmatching 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 thePamelaModelFactoryto 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)booleanisMethodInvolvedInPattern(java.lang.reflect.Method method)<I> voidnotifiedNewInstance(I newInstance, ModelEntity<I> modelEntity)<P extends PatternDefinition>
voidregisterPatternInstance(PatternInstance<P> patternInstance)voidregisterStakeHolderForPatternInstance(java.lang.Object stakeHolder, java.lang.String role, PatternInstance<?> patternInstance)booleanremoveExecutionMonitor(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 appropriateModelPropertyXMLTagmatching 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 thePamelaModelFactoryto 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)
-
-