Package io.lionweb.model.impl
Class AbstractClassifierInstance<T extends Classifier<T>>
java.lang.Object
io.lionweb.model.impl.AbstractClassifierInstance<T>
- All Implemented Interfaces:
ClassifierInstance<T>,HasFeatureValues
- Direct Known Subclasses:
DynamicClassifierInstance,M3Node,ProxyNode
public abstract class AbstractClassifierInstance<T extends Classifier<T>>
extends Object
implements ClassifierInstance<T>
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddAnnotation(AnnotationInstance instance) Add the annotation.Return all the annotations associated to this ClassifierInstance.getAnnotations(Annotation annotation) Given a specific Annotation type it returns either the list of instances of that Annotation associated to the Node.voidremoveAnnotation(AnnotationInstance instance) voidremoveChild(Containment containment, int index) Remove the child at the given index, considering the children under the given containment.voidremoveChild(Node child) Remove the given child from the list of children associated with the Node, making it a dangling Node.voidremoveReferenceValue(Reference reference, int index) Remove the reference value at the given index, considering the reference values under the given reference.voidremoveReferenceValue(Reference reference, ReferenceValue referenceValue) Remove the first reference value that is equal to the given referenceValue.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface io.lionweb.model.ClassifierInstance
getClassifier, getID, getParentMethods inherited from interface io.lionweb.model.HasFeatureValues
addChild, addReferenceValue, getChildren, getPropertyValue, getReferenceValues, setPropertyValue, setReferenceValues
-
Field Details
-
annotations
-
-
Constructor Details
-
AbstractClassifierInstance
public AbstractClassifierInstance()
-
-
Method Details
-
getAnnotations
Description copied from interface:ClassifierInstanceReturn all the annotations associated to this ClassifierInstance.- Specified by:
getAnnotationsin interfaceClassifierInstance<T extends Classifier<T>>
-
getAnnotations
Given a specific Annotation type it returns either the list of instances of that Annotation associated to the Node.- Specified by:
getAnnotationsin interfaceClassifierInstance<T extends Classifier<T>>
-
addAnnotation
Description copied from interface:ClassifierInstanceAdd the annotation. Note that we can always have multiple annotation instances of the same annotation type attached to a node, so this will never replace an existing annotation instance.- Specified by:
addAnnotationin interfaceClassifierInstance<T extends Classifier<T>>
-
removeAnnotation
- Specified by:
removeAnnotationin interfaceClassifierInstance<T extends Classifier<T>>
-
removeChild
Description copied from interface:HasFeatureValuesRemove the given child from the list of children associated with the Node, making it a dangling Node. If the specified Node is not currently a child of this Node the exception IllegalArgumentException will be thrown.- Specified by:
removeChildin interfaceHasFeatureValues
-
removeChild
Description copied from interface:HasFeatureValuesRemove the child at the given index, considering the children under the given containment.If there is no match the exception IllegalArgumentException will be thrown.
- Specified by:
removeChildin interfaceHasFeatureValues
-
removeReferenceValue
Description copied from interface:HasFeatureValuesRemove the reference value at the given index, considering the reference values under the given reference.If there is no match the exception IllegalArgumentException will be thrown.
- Specified by:
removeReferenceValuein interfaceHasFeatureValues
-
removeReferenceValue
public void removeReferenceValue(@Nonnull Reference reference, @Nullable ReferenceValue referenceValue) Description copied from interface:HasFeatureValuesRemove the first reference value that is equal to the given referenceValue. Node. If there is no match the exception IllegalArgumentException will be thrown.- Specified by:
removeReferenceValuein interfaceHasFeatureValues
-