diff --git a/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java b/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java index b2d70b7f1..e160972b7 100755 --- a/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java +++ b/src/de/dhbwstuttgart/syntaxtree/ClassOrInterface.java @@ -24,19 +24,36 @@ public class ClassOrInterface extends GTVDeclarationContext implements IItemWith protected boolean isInterface; private List implementedInterfaces; + public ClassOrInterface(Modifiers modifiers, JavaClassName name, Block class_block, List fielddecl, GenericDeclarationList genericClassParameters, int offset, RefType superClass, Boolean isInterface, List implementedInterfaces){ + if(modifiers != null){ + this.modifiers = modifiers; + } + if(name != null){ + this.name = name; + } + if(class_block != null){ + this.class_block = class_block; + } + if(fielddecl != null){ + this.fielddecl = fielddecl; + } + if(genericClassParameters != null){ + this.genericClassParameters = genericClassParameters; + } + this.offset = offset; + if(superClass != null){ + this.superClass = superClass; + } + this.isInterface = isInterface; + if(implementedInterfaces != null){ + this.implementedInterfaces = implementedInterfaces; + } + } + // Gets class name public JavaClassName getClassName(){ return this.name; } - // Sets class name. - public void setClassName(JavaClassName name){ - this.name = name; - } - - // Sets interface "switch". - public void setInterface(Boolean isInterface){ - this.isInterface = isInterface; - } }