2013-10-18 13:33:46 +02:00
|
|
|
// ino.module.InstanceOf.8633.package
|
2014-09-02 10:33:54 +02:00
|
|
|
package de.dhbwstuttgart.syntaxtree.statement;
|
2013-10-18 13:33:46 +02:00
|
|
|
// ino.end
|
|
|
|
// ino.module.InstanceOf.8633.import
|
|
|
|
import java.util.Enumeration;
|
|
|
|
import java.util.Hashtable;
|
2014-02-09 16:07:31 +01:00
|
|
|
|
2015-06-16 14:58:27 +02:00
|
|
|
import org.apache.bcel.generic.ClassGen;
|
2014-09-04 16:35:44 +02:00
|
|
|
|
2015-06-16 14:58:27 +02:00
|
|
|
import de.dhbwstuttgart.typeinference.Menge;
|
|
|
|
import de.dhbwstuttgart.logger.Logger;
|
2014-09-04 16:35:44 +02:00
|
|
|
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
|
|
|
|
import de.dhbwstuttgart.myexception.JVMCodeException;
|
|
|
|
import de.dhbwstuttgart.myexception.SCStatementException;
|
2014-09-02 10:33:54 +02:00
|
|
|
import de.dhbwstuttgart.syntaxtree.Class;
|
2014-09-04 16:35:44 +02:00
|
|
|
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
2014-09-02 10:33:54 +02:00
|
|
|
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.type.Type;
|
|
|
|
import de.dhbwstuttgart.typeinference.ConstraintsSet;
|
|
|
|
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
|
|
|
import de.dhbwstuttgart.typeinference.ResultSet;
|
|
|
|
import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions;
|
2013-10-18 13:33:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ino.class.InstanceOf.25352.declaration
|
|
|
|
public class InstanceOf extends BinaryExpr
|
|
|
|
// ino.end
|
|
|
|
// ino.class.InstanceOf.25352.body
|
|
|
|
{
|
|
|
|
// ino.attribute.expr.25356.declaration
|
|
|
|
public Expr expr;
|
|
|
|
// ino.end
|
|
|
|
// ino.attribute.reftype.25359.declaration
|
|
|
|
private RefType reftype;
|
|
|
|
// ino.end
|
|
|
|
// ino.attribute.parserlog.25362.decldescription type=line
|
|
|
|
// private boolean is_instance = false;
|
|
|
|
// ino.end
|
|
|
|
// ino.attribute.parserlog.25362.declaration
|
|
|
|
protected static Logger parserlog = Logger.getLogger("parser");
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
// ino.method.InstanceOf.25365.definition
|
|
|
|
public InstanceOf(int offset,int variableLength)
|
|
|
|
// ino.end
|
|
|
|
// ino.method.InstanceOf.25365.body
|
|
|
|
{
|
|
|
|
super(offset,variableLength);
|
|
|
|
// #JB# 20.04.2005
|
|
|
|
// ###########################################################
|
2015-06-10 11:36:40 +02:00
|
|
|
this.setType(new RefType("Boolean",this,this.getOffset()));
|
2013-10-18 13:33:46 +02:00
|
|
|
//this.setType(new Type("boolean"));
|
|
|
|
// ###########################################################
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
// ino.method.set_Expr.25368.definition
|
|
|
|
public void set_Expr(Expr exp)
|
|
|
|
// ino.end
|
|
|
|
// ino.method.set_Expr.25368.body
|
|
|
|
{
|
|
|
|
this.expr = exp;
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
// ino.method.set_Type.25371.definition
|
|
|
|
public void set_Type(RefType typ)
|
|
|
|
// ino.end
|
|
|
|
// ino.method.set_Type.25371.body
|
|
|
|
{
|
|
|
|
this.reftype = typ;
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
// ino.method.get_Name.25377.definition
|
|
|
|
public String get_Name()
|
|
|
|
// ino.end
|
|
|
|
// ino.method.get_Name.25377.body
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
// ino.end
|
2015-05-12 19:49:27 +02:00
|
|
|
|
2013-10-18 13:33:46 +02:00
|
|
|
|
|
|
|
// ino.method.wandleRefTypeAttributes2GenericAttributes.25389.definition
|
2015-04-22 21:40:22 +02:00
|
|
|
public void wandleRefTypeAttributes2GenericAttributes(Menge<Type> paralist, Menge<GenericTypeVar> genericMethodParameters)
|
2013-10-18 13:33:46 +02:00
|
|
|
// ino.end
|
|
|
|
// ino.method.wandleRefTypeAttributes2GenericAttributes.25389.body
|
|
|
|
{
|
|
|
|
}
|
|
|
|
// ino.end
|
2014-09-05 11:49:31 +02:00
|
|
|
|
2013-10-18 13:33:46 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) {
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
return null;
|
|
|
|
}
|
2014-03-27 16:43:07 +01:00
|
|
|
|
|
|
|
@Override
|
2015-04-22 21:40:22 +02:00
|
|
|
public Menge<SyntaxTreeNode> getChildren() {
|
|
|
|
Menge<SyntaxTreeNode> ret = new Menge<SyntaxTreeNode>();
|
2014-03-27 16:43:07 +01:00
|
|
|
ret.add(this.expr);
|
|
|
|
return ret;
|
|
|
|
}
|
2015-06-16 14:58:27 +02:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void genByteCode(ClassGen _cg) {
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
}
|
2013-10-18 13:33:46 +02:00
|
|
|
|
|
|
|
|
|
|
|
}
|
|
|
|
// ino.end
|