Class JavaAssignment
- 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.AbstractJavaStatement
-
- net.ssehub.easy.instantiation.java.artifacts.JavaAssignment
-
- All Implemented Interfaces:
IArtifact,IStringValueProvider,IVilType,IJavaParent
public class JavaAssignment extends AbstractJavaStatement
Represents an assignment expression within a method.- Author:
- El-Sharkawy
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider
IStringValueProvider.StringComparator
-
-
Constructor Summary
Constructors Constructor Description JavaAssignment(IJavaParent parent, org.eclipse.jdt.core.dom.ExpressionStatement expression, java.lang.String attributeName, org.eclipse.jdt.core.dom.ITypeBinding typeBinding, org.eclipse.jdt.core.dom.ClassInstanceCreation rhs)Constructor for this class if on the right hand side is a constructor call.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ArtifactModelgetArtifactModel()Returns theArtifactModel.java.lang.StringgetFromType()Returns the full qualified name of the assigned element.(package private) java.lang.StringgetParamType(int index)The parameter type at the specified index.(package private) intparameterCount()Returns the number of parameters.java.lang.StringtoString()Returns the assignment as String, for debugging only.-
Methods inherited from class net.ssehub.easy.instantiation.java.artifacts.AbstractJavaStatement
accept, delete, getBinary, getName, getQualifiedName, getStringValue, getText, getType, rename
-
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, wait, wait, wait
-
Methods inherited from interface net.ssehub.easy.instantiation.java.artifacts.IJavaParent
store
-
-
-
-
Constructor Detail
-
JavaAssignment
JavaAssignment(IJavaParent parent, org.eclipse.jdt.core.dom.ExpressionStatement expression, java.lang.String attributeName, org.eclipse.jdt.core.dom.ITypeBinding typeBinding, org.eclipse.jdt.core.dom.ClassInstanceCreation rhs)
Constructor for this class if on the right hand side is a constructor call.- Parameters:
parent- The parent of this artifact.expression- The Statement expression, which may be edited.attributeName- then name of the attribute as stringtypeBinding- The type of the LHS (qualified name), i.e. to which TYPE it is assigned TO.rhs- The creation of the assignment of the right hand side (a constructor call).
-
-
Method Detail
-
parameterCount
int parameterCount()
Returns the number of parameters.- Returns:
- 0 if it has no parameters or the number of parameters.
-
getParamType
java.lang.String getParamType(int index)
The parameter type at the specified index.- Parameters:
index- A 0-based index.- Returns:
- The parameter type.
-
getFromType
public java.lang.String getFromType()
Returns the full qualified name of the assigned element. For instance inObject obj = new String();getFromType would be java.lang.String.- Returns:
- The qualified name of the element which stays on RHS.
-
toString
public java.lang.String toString()
Returns the assignment as String, for debugging only.- Overrides:
toStringin classjava.lang.Object- Returns:
- Returns the assignment as String.
-
getArtifactModel
public ArtifactModel getArtifactModel()
Description copied from interface:IJavaParentReturns theArtifactModel.- Returns:
- artifactmodel
-
-