Class JavaClass

  • 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 JavaClass
    extends JavaParentFragmentArtifact
    Represents a Java class.
    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.TypeDeclaration typeDeclaration  
    • Constructor Summary

      Constructors 
      Constructor Description
      JavaClass​(org.eclipse.jdt.core.dom.TypeDeclaration typeDeclaration, 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 class.
      net.ssehub.easy.instantiation.core.model.vilTypes.Set<JavaAttribute> attributes()
      Returns the attributes of this class.
      net.ssehub.easy.instantiation.core.model.vilTypes.Set<JavaClass> classes()
      Returns the inner classes of this class.
      void delete()  
      void deleteMethodWithCalls​(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator)
      Deletes a method and all java calls assigned to this method.
      void deleteMethodWithCalls​(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator, java.lang.Object replacement)
      Deletes a method and all java calls assigned to this method.
      void deleteStatement​(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator)
      Deletes a statement within a method.
      net.ssehub.easy.instantiation.core.model.artifactModel.ArtifactModel getArtifactModel()
      Returns the ArtifactModel.
      JavaAttribute getAttributeByName​(java.lang.String name)
      Returns the specified Java attribute.
      net.ssehub.easy.instantiation.core.model.artifactModel.representation.Binary getBinary()  
      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()  
      net.ssehub.easy.instantiation.core.model.vilTypes.Set<JavaMethod> methods()
      Returns the methods of this class.
      net.ssehub.easy.instantiation.core.model.vilTypes.Set<JavaQualifiedName> qualifiedNames()
      Returns all qualified names of this class.
      void rename​(java.lang.String name)  
      • 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

      • typeDeclaration

        private org.eclipse.jdt.core.dom.TypeDeclaration typeDeclaration
    • Constructor Detail

      • JavaClass

        public JavaClass​(org.eclipse.jdt.core.dom.TypeDeclaration typeDeclaration,
                         IJavaParent parent)
        Default Constructor.
        Parameters:
        typeDeclaration - the type declaration representing the class
        parent - the parent artifact
    • Method Detail

      • 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 class.
        Returns:
        the annotations
      • methods

        public net.ssehub.easy.instantiation.core.model.vilTypes.Set<JavaMethod> methods()
        Returns the methods of this class.
        Returns:
        the methods
      • 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
      • deleteMethodWithCalls

        public void deleteMethodWithCalls​(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator)
                                   throws net.ssehub.easy.instantiation.core.model.common.VilException
        Deletes a method and all java calls assigned to this method.
        Parameters:
        evaluator - A wrapper type to pass and evaluate
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException - in case something goes wrong
      • deleteMethodWithCalls

        public void deleteMethodWithCalls​(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator,
                                          java.lang.Object replacement)
                                   throws net.ssehub.easy.instantiation.core.model.common.VilException
        Deletes a method and all java calls assigned to this method.
        Parameters:
        evaluator - A wrapper type to pass and evaluate
        replacement - The replacement that should be inserted for when the method is called
        Throws:
        net.ssehub.easy.instantiation.core.model.common.VilException - in case something goes wrong
      • classes

        public net.ssehub.easy.instantiation.core.model.vilTypes.Set<JavaClass> classes()
        Returns the inner classes of this class.
        Returns:
        Set with inner classes
      • attributes

        public net.ssehub.easy.instantiation.core.model.vilTypes.Set<JavaAttribute> attributes()
        Returns the attributes of this class.
        Returns:
        the attributes
      • getAttributeByName

        public JavaAttribute getAttributeByName​(java.lang.String name)
        Returns the specified Java attribute.
        Parameters:
        name - the name of the attribute
        Returns:
        the attribute or null if there is no such attribute
      • qualifiedNames

        public net.ssehub.easy.instantiation.core.model.vilTypes.Set<JavaQualifiedName> qualifiedNames()
        Returns all qualified names of this class.
        Returns:
        the qualified names
      • 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