Package net.ssehub.easy.varModel.model
Class AnnotationVisitor
- java.lang.Object
-
- net.ssehub.easy.varModel.model.AnnotationVisitor
-
- Direct Known Subclasses:
DecisionVariable.InitializationAnnotationVisitor,Resolver.CompoundAnnotationMapper
public abstract class AnnotationVisitor extends java.lang.ObjectVisits a certain set of annotation declarations and assignments (applying to a given scope) and allows processing all of them.- Author:
- Holger Eichelberger
-
-
Constructor Summary
Constructors Constructor Description AnnotationVisitor()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected voidaddToScope(java.util.Set<java.lang.Object> scope, IModelElement element, IAttributeAccess access)Addselementtoscopefor starting iteration ataccess.protected abstract voidprocessAttribute(Attribute attr)Processes an attribute.protected abstract voidprocessAttributeAssignment(AttributeAssignment assng)Processes an attribute assignment.voidvisitAnnotations(IAttributeAccess access)Creates a new decision variable representing a specific decision.private voidvisitAnnotations(IAttributeAccess access, java.util.Set<java.lang.Object> scope)Visits all annotations inaccess.
-
-
-
Method Detail
-
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(java.util.Set<java.lang.Object> scope, IModelElement element, IAttributeAccess access)Addselementtoscopefor starting iteration ataccess. May be used to filter the scope. Called only for parents ofaccess.accessis included by default- Parameters:
scope- the scope elementselement- the element to be addedaccess- 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, java.util.Set<java.lang.Object> scope) throws IvmlException
Visits all annotations inaccess.- Parameters:
access- the annotations to visitscope- valid elements an annotation may be attached to- Throws:
IvmlException- in case of processing problems
-
-