Class AnnotationVisitor

java.lang.Object
net.ssehub.easy.varModel.model.AnnotationVisitor
Direct Known Subclasses:
DecisionVariable.InitializationAnnotationVisitor

public abstract class AnnotationVisitor extends Object
Visits a certain set of annotation declarations and assignments (applying to a given scope) and allows processing all of them.
Author:
Holger Eichelberger
  • Constructor Details

    • AnnotationVisitor

      public AnnotationVisitor()
  • Method Details

    • processAttributeAssignment

      protected abstract void processAttributeAssignment(AttributeAssignment assng) throws IvmlException
      Processes an attribute assignment.
      Parameters:
      assng - the assignment to be processed
      Throws:
      IvmlException - in case of processing problems
    • processAttribute

      protected abstract void processAttribute(Attribute attr) throws IvmlException
      Processes an attribute.
      Parameters:
      attr - the attribute to process
      Throws:
      IvmlException - in case of processing problems
    • addToScope

      protected void addToScope(Set<Object> scope, IModelElement element, IAttributeAccess access)
      Adds element to scope for starting iteration at access. May be used to filter the scope. Called only for parents of access. access is included by default
      Parameters:
      scope - the scope elements
      element - the element to be added
      access - the attribute access where to start at
    • visitAnnotations

      public void visitAnnotations(IAttributeAccess access) throws IvmlException
      Creates a new decision variable representing a specific decision.
      Parameters:
      access - the element declaring the attributes
      Throws:
      IvmlException - in case of processing problems
    • visitAnnotations

      private void visitAnnotations(IAttributeAccess access, Set<Object> scope) throws IvmlException
      Visits all annotations in access.
      Parameters:
      access - the annotations to visit
      scope - valid elements an annotation may be attached to
      Throws:
      IvmlException - in case of processing problems