forked from JavaTX/JavaCompilerCore
157 lines
4.5 KiB
Java
Executable File
157 lines
4.5 KiB
Java
Executable File
// ino.module.InstanceOf.8633.package
|
|
package mycompiler.mystatement;
|
|
// ino.end
|
|
// ino.module.InstanceOf.8633.import
|
|
import java.util.Enumeration;
|
|
import java.util.Hashtable;
|
|
import java.util.Vector;
|
|
|
|
import mycompiler.mybytecode.ClassFile;
|
|
import mycompiler.mybytecode.CodeAttribute;
|
|
import mycompiler.mybytecode.JVMCode;
|
|
import mycompiler.myclass.Class;
|
|
import mycompiler.myexception.CTypeReconstructionException;
|
|
import mycompiler.myexception.JVMCodeException;
|
|
import mycompiler.myexception.SCStatementException;
|
|
import mycompiler.mytype.BooleanType;
|
|
import mycompiler.mytype.GenericTypeVar;
|
|
import mycompiler.mytype.RefType;
|
|
import mycompiler.mytype.Type;
|
|
import mycompiler.mytypereconstruction.CSupportData;
|
|
import mycompiler.mytypereconstruction.set.CSubstitutionSet;
|
|
import mycompiler.mytypereconstruction.set.CTripleSet;
|
|
import mycompiler.mytypereconstruction.set.CTypeAssumptionSet;
|
|
import mycompiler.mytypereconstruction.typeassumption.CTypeAssumption;
|
|
|
|
import org.apache.log4j.Logger;
|
|
// ino.end
|
|
|
|
|
|
import typinferenz.ConstraintsSet;
|
|
import typinferenz.JavaCodeResult;
|
|
import typinferenz.ResultSet;
|
|
import typinferenz.assumptions.TypeAssumptions;
|
|
|
|
|
|
|
|
|
|
// 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
|
|
// ###########################################################
|
|
this.setType(new BooleanType());
|
|
//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
|
|
|
|
// ino.method.codegen.25380.definition
|
|
public void codegen(ClassFile classfile, CodeAttribute code, Vector paralist)
|
|
throws JVMCodeException
|
|
// ino.end
|
|
// ino.method.codegen.25380.body
|
|
{
|
|
expr.codegen(classfile, code, paralist);
|
|
code.add_code(JVMCode.instanceof_);
|
|
code.add_code_short(classfile.add_CONSTANT_Class_info(reftype.getName()));
|
|
}
|
|
// ino.end
|
|
|
|
// ino.method.TRExp.25383.definition
|
|
public CTripleSet TRExp(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData)
|
|
// ino.end
|
|
// ino.method.TRExp.25383.body
|
|
{
|
|
throw CTypeReconstructionException.createNotImplementedException();
|
|
}
|
|
// ino.end
|
|
|
|
// ino.method.TRStatement.25386.definition
|
|
public CTripleSet TRStatement(CSubstitutionSet sigma, CTypeAssumptionSet V, CSupportData supportData)
|
|
// ino.end
|
|
// ino.method.TRStatement.25386.body
|
|
{
|
|
throw CTypeReconstructionException.createNotImplementedException();
|
|
}
|
|
// ino.end
|
|
|
|
// ino.method.wandleRefTypeAttributes2GenericAttributes.25389.definition
|
|
public void wandleRefTypeAttributes2GenericAttributes(Vector<Type> paralist, Vector<GenericTypeVar> genericMethodParameters)
|
|
// ino.end
|
|
// ino.method.wandleRefTypeAttributes2GenericAttributes.25389.body
|
|
{
|
|
}
|
|
// ino.end
|
|
|
|
public void addOffsetsToExpression(CTypeAssumption localAssumption,String NameVariable,boolean isMemberVariable)
|
|
{
|
|
expr.addOffsetsToExpression(localAssumption,NameVariable,isMemberVariable);
|
|
}
|
|
|
|
@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;
|
|
}
|
|
|
|
|
|
}
|
|
// ino.end
|