Class JavaParentFragmentArtifact
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.artifactModel.FragmentArtifact
-
- net.ssehub.easy.instantiation.java.artifacts.JavaFragmentArtifact
-
- net.ssehub.easy.instantiation.java.artifacts.JavaParentFragmentArtifact
-
- All Implemented Interfaces:
IArtifact,IStringValueProvider,IVilType,IJavaParent
- Direct Known Subclasses:
AbstractJavaStatement,JavaAttribute,JavaClass,JavaImport,JavaMethod,JavaPackage,JavaQualifiedName
abstract class JavaParentFragmentArtifact extends JavaFragmentArtifact implements IJavaParent
A Java fragment artifact, which is also a Java parent element. Please note that it may be necessary to overridedeleteChild(FragmentArtifact)depending on the child storage strategy of the actual implementation.- Author:
- Holger Eichelberger
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider
IStringValueProvider.StringComparator
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedJavaParentFragmentArtifact(IJavaParent parent)Creates a new parent fragment artifact.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Set<JavaAnnotation>annotations(java.util.List<org.eclipse.jdt.core.dom.IExtendedModifier> modifierList)Returns the annotations for a givenmodifierList.voiddeleteChild(FragmentArtifact child)Notifies the parent that the given child shall be deleted.voidnotifyChildChanged(FragmentArtifact child)Notifies the parent that one of its childs changed.private static java.lang.StringtoString(org.eclipse.jdt.core.dom.Expression expression)Turns a dom tree expression into a string.-
Methods inherited from class net.ssehub.easy.instantiation.java.artifacts.JavaFragmentArtifact
delete, getNameSafe, getParent, notifyChanged, store, update
-
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
-
Methods inherited from interface net.ssehub.easy.instantiation.core.model.artifactModel.IArtifact
accept, getBinary, getName, getText, rename
-
Methods inherited from interface net.ssehub.easy.instantiation.java.artifacts.IJavaParent
getArtifactModel, store
-
Methods inherited from interface net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider
getStringValue
-
-
-
-
Constructor Detail
-
JavaParentFragmentArtifact
protected JavaParentFragmentArtifact(IJavaParent parent)
Creates a new parent fragment artifact.- Parameters:
parent- the parent of this artifact
-
-
Method Detail
-
notifyChildChanged
public void notifyChildChanged(FragmentArtifact child)
Description copied from interface:IJavaParentNotifies the parent that one of its childs changed.- Specified by:
notifyChildChangedin interfaceIJavaParent- Parameters:
child- the child which changed
-
deleteChild
public void deleteChild(FragmentArtifact child) throws VilException
Description copied from interface:IJavaParentNotifies the parent that the given child shall be deleted. The parent is notified implicitly about the "change" so thatIJavaParent.notifyChildChanged(FragmentArtifact)is not needed- Specified by:
deleteChildin interfaceIJavaParent- Parameters:
child- the child to be deleted- Throws:
VilException- in case that deletion fails
-
toString
private static java.lang.String toString(org.eclipse.jdt.core.dom.Expression expression)
Turns a dom tree expression into a string.- Parameters:
expression- the expression- Returns:
- the string representation
-
annotations
public Set<JavaAnnotation> annotations(java.util.List<org.eclipse.jdt.core.dom.IExtendedModifier> modifierList)
Returns the annotations for a givenmodifierList.- Parameters:
modifierList- the modifier list to be processed- Returns:
- An ArraySet with all annotations
-
-