// ino.module.NotExpr.8643.package package de.dhbwstuttgart.syntaxtree.statement; // ino.end // ino.module.NotExpr.8643.import import java.util.Hashtable; import java.util.Iterator; import java.util.Vector; import org.apache.log4j.Logger; import de.dhbwstuttgart.bytecode.ClassFile; import de.dhbwstuttgart.bytecode.CodeAttribute; import de.dhbwstuttgart.myexception.CTypeReconstructionException; import de.dhbwstuttgart.myexception.JVMCodeException; import de.dhbwstuttgart.myexception.SCStatementException; import de.dhbwstuttgart.syntaxtree.Class; import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode; import de.dhbwstuttgart.syntaxtree.type.BooleanType; import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar; import de.dhbwstuttgart.syntaxtree.type.RefType; import de.dhbwstuttgart.syntaxtree.type.Type; import de.dhbwstuttgart.syntaxtree.type.Void; import de.dhbwstuttgart.typeinference.ConstraintsSet; import de.dhbwstuttgart.typeinference.JavaCodeResult; import de.dhbwstuttgart.typeinference.OderConstraint; import de.dhbwstuttgart.typeinference.Pair; import de.dhbwstuttgart.typeinference.ResultSet; import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions; import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet; import de.dhbwstuttgart.typeinference.unify.Unify; // ino.class.NotExpr.25873.declaration public class NotExpr extends UnaryExpr // ino.end // ino.class.NotExpr.25873.body { // ino.method.NotExpr.25877.definition public NotExpr(int offset,int variableLength) // ino.end // ino.method.NotExpr.25877.body { super(offset,variableLength); } // ino.end // ino.attribute.not.25880.declaration private UnaryNot not; // ino.end // ino.attribute.expr.25883.declaration public Expr expr; // ino.end // ino.attribute.parserlog.25886.declaration protected static Logger parserlog = Logger.getLogger("parser"); // ino.end // ino.method.get_Name.25892.definition public String get_Name() // ino.end // ino.method.get_Name.25892.body { return null; } // ino.end // ino.method.get_Expr.25895.definition public Expr get_Expr() // ino.end // ino.method.get_Expr.25895.body { return expr; } // ino.end // ino.method.set_UnaryNot.25898.definition public void set_UnaryNot(UnaryNot unot) // ino.end // ino.method.set_UnaryNot.25898.body { this.not = unot; } // ino.end // ino.method.set_Expr.25901.definition public void set_Expr(Expr ex) // ino.end // ino.method.set_Expr.25901.body { this.expr = ex; } // ino.end // ino.method.codegen.25904.definition public void codegen(ClassFile classfile, CodeAttribute code, Vector paralist) throws JVMCodeException // ino.end // ino.method.codegen.25904.body { if(expr instanceof Binary) ((Binary)expr).not_codegen(classfile, code, paralist); else if(expr instanceof NotExpr) ((NotExpr)expr).not_codegen(classfile, code, paralist); else { expr.codegen(classfile, code, paralist); not.codegen(classfile, code, true); } } // ino.end // ino.method.not_codegen.25907.definition public void not_codegen(ClassFile classfile, CodeAttribute code, Vector paralist) throws JVMCodeException // ino.end // ino.method.not_codegen.25907.body { if(expr instanceof Binary) ((Binary)expr).codegen(classfile, code, paralist); else if(expr instanceof NotExpr) ((NotExpr)expr).codegen(classfile, code, paralist); else { expr.codegen(classfile, code, paralist); not.codegen(classfile, code, false); } } // ino.end /* public void if_codegen(ClassFile classfile, Code_attribute code, boolean sw) throws JVMCodeException { if(expr instanceof NotExpr) if_codegen(classfile, code, !sw); else { expr.codegen(classfile, code); not.if_codegen(classfile, code, sw); } } */ // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25916.definition public void wandleRefTypeAttributes2GenericAttributes(Vector paralist, Vector genericMethodParameters) // ino.end // ino.method.wandleRefTypeAttributes2GenericAttributes.25916.body { } // ino.end @Override public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) { ConstraintsSet ret = new ConstraintsSet(); OderConstraint constraint = new OderConstraint(); constraint.addConstraint(this.getType().TYPE(assumptions, this), assumptions.getTypeFor(new RefType("Boolean",this,-1),this)); ret.add(constraint); return ret; } @Override public JavaCodeResult printJavaCode(ResultSet resultSet) { // TODO Auto-generated method stub return null; } @Override public Vector getChildren() { Vector ret = new Vector(); ret.add(this.expr); return ret; } } // ino.end