Class 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
    • 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 org.eclipse.jdt.core.dom.MethodDeclaration methodDeclaration  
    • 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
      void accept​(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.
      void delete()  
      void deleteStatement​(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator)
      Deletes a statement within a method.
      void deleteWithCalls()
      Deletes a method and all calls relating to this method.
      net.ssehub.easy.instantiation.core.model.artifactModel.ArtifactModel getArtifactModel()
      Returns the ArtifactModel.
      net.ssehub.easy.instantiation.core.model.artifactModel.representation.Binary getBinary()  
      (package private) org.eclipse.jdt.core.dom.MethodDeclaration getMethodDeclaration()
      Getter for the MethodDeclaration of the method.
      java.lang.String getName()  
      java.lang.String getStringValue​(net.ssehub.easy.instantiation.core.model.vilTypes.IStringValueProvider.StringComparator comparator)  
      net.ssehub.easy.instantiation.core.model.artifactModel.representation.Text getText()  
      void rename​(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.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
    • Field Detail

      • methodDeclaration

        private org.eclipse.jdt.core.dom.MethodDeclaration methodDeclaration
    • Constructor Detail

      • JavaMethod

        public JavaMethod​(org.eclipse.jdt.core.dom.MethodDeclaration node,
                          IJavaParent parent)
        Default Constructor.
        Parameters:
        node - The Method Declaration
        parent - 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.VilException
        Deletes 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.VilException
        Deletes 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:
        delete in interface net.ssehub.easy.instantiation.core.model.artifactModel.IArtifact
        Overrides:
        delete in class JavaFragmentArtifact
        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: IJavaParent
        Returns the ArtifactModel.
        Returns:
        artifactmodel