Interface ClassifierInstance<T extends Classifier<T>>

All Superinterfaces:
HasFeatureValues
All Known Subinterfaces:
AnnotationInstance, Node
All Known Implementing Classes:
AbstractClassifierInstance, Annotation, Classifier, Concept, Containment, DataType, DynamicAnnotationInstance, DynamicClassifierInstance, DynamicNode, Enumeration, EnumerationLiteral, Feature, Field, Interface, Language, LanguageEntity, Link, LionCoreBuiltins, M3Node, PrimitiveType, Property, ProxyNode, Reference, StructuredDataType

public interface ClassifierInstance<T extends Classifier<T>> extends HasFeatureValues
  • Method Details

    • getAnnotations

      @Nonnull List<AnnotationInstance> getAnnotations()
      Return all the annotations associated to this ClassifierInstance.
    • getAnnotations

      @Nonnull List<AnnotationInstance> getAnnotations(@Nonnull Annotation annotation)
      Given a specific Annotation type it returns either the list of instances of that Annotation associated to the Node.
    • addAnnotation

      void addAnnotation(@Nonnull AnnotationInstance instance)
      Add 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.
      Throws:
      IllegalArgumentException - In case the specified Annotation link cannot be used on Nodes of this Concept.
    • removeAnnotation

      void removeAnnotation(@Nonnull AnnotationInstance instance)
    • getID

      String getID()
    • getClassifier

      T getClassifier()
    • getParent

      ClassifierInstance<?> getParent()
      The immediate parent of the Node. This should be null only for root nodes.
    • collectSelfAndDescendants

      static <T extends ClassifierInstance<?>> void collectSelfAndDescendants(T self, boolean includeAnnotations, Collection<T> result)
      Collects `self` and all its descendants into `result`.