Class JavaClass
- 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.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
-
-
Field Summary
Fields Modifier and Type Field Description private org.eclipse.jdt.core.dom.TypeDeclarationtypeDeclaration
-
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 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 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.voiddelete()voiddeleteMethodWithCalls(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator)Deletes a method and all java calls assigned to this method.voiddeleteMethodWithCalls(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator, java.lang.Object replacement)Deletes a method and all java calls assigned to this method.voiddeleteStatement(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator)Deletes a statement within a method.net.ssehub.easy.instantiation.core.model.artifactModel.ArtifactModelgetArtifactModel()Returns theArtifactModel.JavaAttributegetAttributeByName(java.lang.String name)Returns the specified Java attribute.net.ssehub.easy.instantiation.core.model.artifactModel.representation.BinarygetBinary()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()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.voidrename(java.lang.String name)-
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
-
JavaClass
public JavaClass(org.eclipse.jdt.core.dom.TypeDeclaration typeDeclaration, IJavaParent parent)Default Constructor.- Parameters:
typeDeclaration- the type declaration representing the classparent- the parent artifact
-
-
Method Detail
-
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 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.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
-
deleteMethodWithCalls
public void deleteMethodWithCalls(net.ssehub.easy.instantiation.core.model.expressions.ExpressionEvaluator evaluator) throws net.ssehub.easy.instantiation.core.model.common.VilExceptionDeletes 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.VilExceptionDeletes a method and all java calls assigned to this method.- Parameters:
evaluator- A wrapper type to pass and evaluatereplacement- 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:IJavaParentReturns theArtifactModel.- Returns:
- artifactmodel
-
-