Class JavaMethod
- 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
-
- net.ssehub.easy.instantiation.java.artifacts.JavaMethod
-
- 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,IJavaParent
public class JavaMethod extends JavaParentFragmentArtifact
Represents a Java annotation.- Author:
- Holger Eichelberger, Sass
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.jdt.core.dom.MethodDeclarationmethodDeclaration
-
Constructor Summary
Constructors Constructor Description JavaMethod(org.eclipse.jdt.core.dom.MethodDeclaration node, IJavaParent parent)Default Constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaccept(net.ssehub.easy.instantiation.core.model.artifactModel.IArtifactVisitor visitor)net.ssehub.easy.instantiation.core.model.vilTypes.Set<JavaAnnotation>annotations()Returns the annotations of this method.private net.ssehub.easy.instantiation.core.model.vilTypes.ArraySet<AbstractJavaStatement>assignments()Returns all statements within a method.voiddelete()voiddeleteStatement(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator)Deletes a statement within a method.voiddeleteWithCalls()Deletes a method and all calls relating to this method.net.ssehub.easy.instantiation.core.model.artifactModel.ArtifactModelgetArtifactModel()Returns theArtifactModel.net.ssehub.easy.instantiation.core.model.artifactModel.representation.BinarygetBinary()(package private) org.eclipse.jdt.core.dom.MethodDeclarationgetMethodDeclaration()Getter for the MethodDeclaration of the method.java.lang.StringgetName()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)private net.ssehub.easy.instantiation.core.model.vilTypes.ArraySet<AbstractJavaStatement>statements()Returns all statements within a method.-
Methods inherited from class net.ssehub.easy.instantiation.java.artifacts.JavaParentFragmentArtifact
annotations, deleteChild, notifyChildChanged
-
Methods inherited from class net.ssehub.easy.instantiation.java.artifacts.JavaFragmentArtifact
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.java.artifacts.IJavaParent
store
-
-
-
-
Constructor Detail
-
JavaMethod
public JavaMethod(org.eclipse.jdt.core.dom.MethodDeclaration node, IJavaParent parent)Default Constructor.- Parameters:
node- The Method Declarationparent- the parent fragment
-
-
Method Detail
-
statements
private net.ssehub.easy.instantiation.core.model.vilTypes.ArraySet<AbstractJavaStatement> statements()
Returns all statements within a method.- Returns:
- Set of all statements
-
assignments
private net.ssehub.easy.instantiation.core.model.vilTypes.ArraySet<AbstractJavaStatement> assignments()
Returns all statements within a method.- Returns:
- Set of all statements
-
deleteStatement
public void deleteStatement(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator) throws net.ssehub.easy.instantiation.core.model.common.VilExceptionDeletes a statement within a method. Right now only JavaCall can be deleted.- Parameters:
evaluator- A wrapper type to pass and evaluate- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- in case something goes wrong
-
deleteWithCalls
public void deleteWithCalls() throws net.ssehub.easy.instantiation.core.model.common.VilExceptionDeletes a method and all calls relating to this method.- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- in case something goes wrong
-
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
-
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)
-
annotations
public net.ssehub.easy.instantiation.core.model.vilTypes.Set<JavaAnnotation> annotations()
Returns the annotations of this method.- Returns:
- the annotations
-
getMethodDeclaration
org.eclipse.jdt.core.dom.MethodDeclaration getMethodDeclaration()
Getter for the MethodDeclaration of the method.- Returns:
- Returns the MethodDeclaration of the method.
-
getStringValue
public java.lang.String getStringValue(net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider.StringComparator comparator)
-
getArtifactModel
public net.ssehub.easy.instantiation.core.model.artifactModel.ArtifactModel getArtifactModel()
Description copied from interface:IJavaParentReturns theArtifactModel.- Returns:
- artifactmodel
-
-