Class JavaAnnotation
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.artifactModel.FragmentArtifact
-
- net.ssehub.easy.instantiation.java.artifacts.JavaFragmentArtifact
-
- net.ssehub.easy.instantiation.java.artifacts.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
-
-
Field Summary
Fields Modifier and Type Field Description (package private) static java.lang.StringDEFAULT_FIELDprivate java.util.Map<java.lang.String,java.lang.String>fieldsprivate java.lang.StringqualifiedNameprivate java.lang.StringsimpleName
-
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 voidaccept(net.ssehub.easy.instantiation.core.model.artifactModel.IArtifactVisitor visitor)voiddelete()net.ssehub.easy.instantiation.core.model.vilTypes.Set<java.lang.String>fields()Returns the fields of this annotation.java.lang.StringgetAnnotationValue(java.lang.String field)Returns the annotation value as a string.net.ssehub.easy.instantiation.core.model.artifactModel.representation.BinarygetBinary()java.lang.StringgetName()java.lang.StringgetQualifiedName()Returns the qualified name of the annotation.java.lang.StringgetStringValue(net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider.StringComparator comparator)net.ssehub.easy.instantiation.core.model.artifactModel.representation.TextgetText()voidrename(java.lang.String name)(package private) static java.lang.StringtoSimpleName(java.lang.String name)Returns the simple name of a possible qualified name.-
Methods inherited from class net.ssehub.easy.instantiation.java.artifacts.JavaFragmentArtifact
getNameSafe, getParent, notifyChanged, store, update
-
-
-
-
Field Detail
-
DEFAULT_FIELD
static final java.lang.String DEFAULT_FIELD
- See Also:
- Constant Field Values
-
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 namefields- 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:
deletein interfacenet.ssehub.easy.instantiation.core.model.artifactModel.IArtifact- Overrides:
deletein classJavaFragmentArtifact- 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)
-
-