Class OptionalityFragment
- java.lang.Object
-
- net.ssehub.easy.instantiation.core.model.artifactModel.FragmentArtifact
-
- net.ssehub.easy.instantiation.core.model.artifactModel.variability.VariabilityFragment
-
- net.ssehub.easy.instantiation.core.model.artifactModel.variability.OptionalityFragment
-
public class OptionalityFragment extends VariabilityFragment
Describes an optional fragment.- Author:
- Holger Eichelberger
-
-
Field Summary
Fields Modifier and Type Field Description private FragmentArtifactoptional
-
Constructor Summary
Constructors Constructor Description OptionalityFragment(FragmentArtifact optional)Creates a new optionality fragment.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(IArtifactVisitor visitor)Visits this artifact (and dependent on the visitor also contained artifacts and fragments) using the given visitor.voiddelete()Deletes this artifact.BinarygetBinary()Returns the binary representation of the contents of this artifact for manipulation.java.lang.StringgetName()Returns the name of this artifact.FragmentArtifactgetOptionalFragment()Returns the optional fragment.TextgetText()Returns the textual representation of the contents of this artifact for manipulation.voidrename(java.lang.String name)Renames this artifact.voidupdate()Called if the underlying real artifact may have been updated, e.g., by overriding it by another file.-
Methods inherited from class net.ssehub.easy.instantiation.core.model.artifactModel.FragmentArtifact
exists, lastModification, store
-
-
-
-
Field Detail
-
optional
private FragmentArtifact optional
-
-
Constructor Detail
-
OptionalityFragment
public OptionalityFragment(FragmentArtifact optional)
Creates a new optionality fragment.- Parameters:
optional- the optional fragment
-
-
Method Detail
-
getOptionalFragment
public FragmentArtifact getOptionalFragment()
Returns the optional fragment.- Returns:
- the optional fragment
-
delete
public void delete() throws VilExceptionDescription copied from interface:IArtifactDeletes this artifact.- Throws:
VilException- in case of serious problems so that this operation cannot continue
-
getName
public java.lang.String getName() throws VilExceptionDescription copied from interface:IArtifactReturns the name of this artifact.- Returns:
- the name of this artifact
- Throws:
VilException- in case of serious problems so that this operation cannot continue
-
rename
public void rename(java.lang.String name) throws VilExceptionDescription copied from interface:IArtifactRenames this artifact.- Parameters:
name- the new name of this artifact- Throws:
VilException- in case of serious problems so that this operation cannot continue
-
getText
public Text getText() throws VilException
Description copied from interface:IArtifactReturns the textual representation of the contents of this artifact for manipulation. In case of binary artifacts, the returned object may be empty.- Returns:
- the textual representation of the contents
- Throws:
VilException- in case of obtaining the representation causes serious problems
-
getBinary
public Binary getBinary() throws VilException
Description copied from interface:IArtifactReturns the binary representation of the contents of this artifact for manipulation.- Returns:
- the binary representation of the contents
- Throws:
VilException- in case of obtaining the representation causes serious problems
-
accept
public void accept(IArtifactVisitor visitor)
Description copied from interface:IArtifactVisits this artifact (and dependent on the visitor also contained artifacts and fragments) using the given visitor.- Specified by:
acceptin interfaceIArtifact- Overrides:
acceptin classVariabilityFragment- Parameters:
visitor- the visitor used for visiting this artifact
-
update
public void update() throws VilExceptionDescription copied from interface:IArtifactCalled if the underlying real artifact may have been updated, e.g., by overriding it by another file.- Throws:
VilException- in case that updating fails
-
-