Class PatternDefinition


  • public abstract class PatternDefinition
    extends java.lang.Object
    Abstract base class for an occurence of an Pattern. An instance is uniquely identified by the patternID 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 the ModelFactory and ModelContext
    • Tagging which methods have to be involved in pattern
    The related AbstractPatternFactory has the responsability of managing life cycle of instance of PatternDefinition
    • Constructor Detail

      • PatternDefinition

        public PatternDefinition​(java.lang.String identifier,
                                 ModelContext modelContext)
    • Method Detail

      • getIdentifier

        public java.lang.String getIdentifier()
      • isMethodInvolvedInPattern

        public abstract boolean isMethodInvolvedInPattern​(java.lang.reflect.Method m)
      • notifiedNewInstance

        public abstract <I> void notifiedNewInstance​(I newInstance,
                                                     ModelEntity<I> modelEntity)