Class JavaAssignment

  • 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 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

        net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider.StringComparator
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private java.util.List<?> arguments  
      private java.lang.String fromType
      The type of the RHS represented (qualified name), i.e.
    • 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.
    • Field Detail

      • fromType

        private java.lang.String fromType
        The type of the RHS represented (qualified name), i.e. from which TYPE it is assigned from. For instance in Object obj = new String(); fromType would be java.lang.String.
      • arguments

        private java.util.List<?> arguments
    • 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 string
        typeBinding - 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 in Object 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:
        toString in class java.lang.Object
        Returns:
        Returns the assignment as String.
      • getArtifactModel

        public net.ssehub.easy.instantiation.core.model.artifactModel.ArtifactModel getArtifactModel()
        Description copied from interface: IJavaParent
        Returns the ArtifactModel.
        Returns:
        artifactmodel