Package org.openflexo.pamela.patterns
Class PatternDefinition
- java.lang.Object
-
- org.openflexo.pamela.patterns.PatternDefinition
-
public abstract class PatternDefinition extends java.lang.Object
Abstract base class for an occurence of anPattern
. An instance is uniquely identified by thepatternID
field of associated annotations.
It has the responsibility of:- Managing life-cycle of related
PatternInstance
, while beeing notified from the creation of new instances by theModelFactory
andModelContext
- Tagging which methods have to be involved in pattern
AbstractPatternFactory
has the responsability of managing life cycle of instance ofPatternDefinition
- Managing life-cycle of related
-
-
Constructor Summary
Constructors Constructor Description PatternDefinition(java.lang.String identifier, ModelContext modelContext)
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract void
finalizeDefinition()
java.lang.String
getIdentifier()
ModelContext
getModelContext()
abstract boolean
isMethodInvolvedInPattern(java.lang.reflect.Method m)
abstract <I> void
notifiedNewInstance(I newInstance, ModelEntity<I> modelEntity)
-
-
-
Constructor Detail
-
PatternDefinition
public PatternDefinition(java.lang.String identifier, ModelContext modelContext)
-
-
Method Detail
-
getIdentifier
public java.lang.String getIdentifier()
-
getModelContext
public ModelContext getModelContext()
-
finalizeDefinition
public abstract void finalizeDefinition() throws ModelDefinitionException
- Throws:
ModelDefinitionException
-
isMethodInvolvedInPattern
public abstract boolean isMethodInvolvedInPattern(java.lang.reflect.Method m)
-
notifiedNewInstance
public abstract <I> void notifiedNewInstance(I newInstance, ModelEntity<I> modelEntity)
-
-