Class JavaAnnotation

  • All Implemented Interfaces:
    net.ssehub.easy.instantiation.core.model.artifactModel.IArtifact, net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider, net.ssehub.easy.instantiation.core.model.vilTypes.IVilType

    public class JavaAnnotation
    extends JavaFragmentArtifact
    Represents a Java annotation.
    Author:
    Holger Eichelberger, Sass
    • Nested Class Summary

      • Nested classes/interfaces inherited from interface net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider

        net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider.StringComparator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) static java.lang.String DEFAULT_FIELD  
      private java.util.Map<java.lang.String,​java.lang.String> fields  
      private java.lang.String qualifiedName  
      private java.lang.String simpleName  
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaAnnotation​(java.lang.String name, java.util.Map<java.lang.String,​java.lang.String> fields, IJavaParent parent)
      Default Constructor.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void accept​(net.ssehub.easy.instantiation.core.model.artifactModel.IArtifactVisitor visitor)  
      void delete()  
      net.ssehub.easy.instantiation.core.model.vilTypes.Set<java.lang.String> fields()
      Returns the fields of this annotation.
      java.lang.String getAnnotationValue​(java.lang.String field)
      Returns the annotation value as a string.
      net.ssehub.easy.instantiation.core.model.artifactModel.representation.Binary getBinary()  
      java.lang.String getName()  
      java.lang.String getQualifiedName()
      Returns the qualified name of the annotation.
      java.lang.String getStringValue​(net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider.StringComparator comparator)  
      net.ssehub.easy.instantiation.core.model.artifactModel.representation.Text getText()  
      void rename​(java.lang.String name)  
      (package private) static java.lang.String toSimpleName​(java.lang.String name)
      Returns the simple name of a possible qualified name.
      • Methods inherited from class net.ssehub.easy.instantiation.core.model.artifactModel.FragmentArtifact

        exists, lastModification
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • qualifiedName

        private java.lang.String qualifiedName
      • simpleName

        private java.lang.String simpleName
      • fields

        private java.util.Map<java.lang.String,​java.lang.String> fields
    • Constructor Detail

      • JavaAnnotation

        public JavaAnnotation​(java.lang.String name,
                              java.util.Map<java.lang.String,​java.lang.String> fields,
                              IJavaParent parent)
        Default Constructor.
        Parameters:
        name - The annotation name
        fields - the annotation fields (name-value mapping)
        parent - the parent artifact or fragment
    • Method Detail

      • toSimpleName

        static java.lang.String toSimpleName​(java.lang.String name)
        Returns the simple name of a possible qualified name.
        Parameters:
        name - the name
        Returns:
        the simple name
      • delete

        public void delete()
                    throws net.ssehub.easy.instantiation.core.model.common.VilException
        Specified by:
        delete in interface net.ssehub.easy.instantiation.core.model.artifactModel.IArtifact
        Overrides:
        delete in class JavaFragmentArtifact
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException
      • getName

        public java.lang.String getName()
                                 throws net.ssehub.easy.instantiation.core.model.common.VilException
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException
      • getQualifiedName

        public java.lang.String getQualifiedName()
        Returns the qualified name of the annotation.
        Returns:
        the qualified name
      • rename

        public void rename​(java.lang.String name)
                    throws net.ssehub.easy.instantiation.core.model.common.VilException
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException
      • getText

        public net.ssehub.easy.instantiation.core.model.artifactModel.representation.Text getText()
                                                                                           throws net.ssehub.easy.instantiation.core.model.common.VilException
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException
      • getBinary

        public net.ssehub.easy.instantiation.core.model.artifactModel.representation.Binary getBinary()
                                                                                               throws net.ssehub.easy.instantiation.core.model.common.VilException
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException
      • accept

        public void accept​(net.ssehub.easy.instantiation.core.model.artifactModel.IArtifactVisitor visitor)
      • fields

        public net.ssehub.easy.instantiation.core.model.vilTypes.Set<java.lang.String> fields()
        Returns the fields of this annotation.
        Returns:
        the fields
      • getAnnotationValue

        public java.lang.String getAnnotationValue​(java.lang.String field)
        Returns the annotation value as a string.
        Parameters:
        field - the name of the field to return
        Returns:
        The annotation value represented as a string, may be null of not found.
      • getStringValue

        public java.lang.String getStringValue​(net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider.StringComparator comparator)