2013-10-18 11:33:46 +00:00
|
|
|
// ino.module.BoolLiteral.8626.package
|
2014-09-02 08:33:54 +00:00
|
|
|
package de.dhbwstuttgart.syntaxtree.statement;
|
2013-10-18 11:33:46 +00:00
|
|
|
// ino.end
|
|
|
|
// ino.module.BoolLiteral.8626.import
|
|
|
|
import java.util.Hashtable;
|
2014-02-09 15:07:31 +00:00
|
|
|
|
2015-06-16 12:58:27 +00:00
|
|
|
import org.apache.bcel.generic.ClassGen;
|
|
|
|
|
|
|
|
import de.dhbwstuttgart.typeinference.Menge;
|
2014-10-09 10:01:16 +00:00
|
|
|
import de.dhbwstuttgart.logger.Logger;
|
2014-09-04 14:35:44 +00:00
|
|
|
import de.dhbwstuttgart.myexception.CTypeReconstructionException;
|
|
|
|
import de.dhbwstuttgart.myexception.JVMCodeException;
|
2014-09-02 08:33:54 +00:00
|
|
|
import de.dhbwstuttgart.syntaxtree.Class;
|
2014-09-04 14:35:44 +00:00
|
|
|
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
2014-09-02 08:33:54 +00: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;
|
2014-09-05 09:49:31 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet;
|
2013-10-18 11:33:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ino.class.BoolLiteral.25089.declaration
|
|
|
|
public class BoolLiteral extends Literal
|
|
|
|
// ino.end
|
|
|
|
// ino.class.BoolLiteral.25089.body
|
|
|
|
{
|
2015-06-16 12:58:27 +00:00
|
|
|
@Override
|
|
|
|
public void genByteCode(ClassGen _cg) {
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ino.attribute.Bool.25093.declaration
|
2013-10-18 11:33:46 +00:00
|
|
|
private boolean Bool;
|
|
|
|
// ino.end
|
|
|
|
// ino.attribute.parserlog.25096.declaration
|
|
|
|
protected static Logger parserlog = Logger.getLogger("parser");
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
// ino.method.BoolLiteral.25099.definition
|
|
|
|
public BoolLiteral()
|
|
|
|
// ino.end
|
|
|
|
// ino.method.BoolLiteral.25099.body
|
|
|
|
{
|
|
|
|
super(-1,-1);
|
|
|
|
// #JB# 20.04.2005
|
|
|
|
// ###########################################################
|
2015-06-10 09:36:40 +00:00
|
|
|
this.setType(new RefType("Boolean",this,this.getOffset()));
|
2013-10-18 11:33:46 +00:00
|
|
|
//this.setType(new Type("boolean"));
|
|
|
|
// ###########################################################
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
2014-11-04 12:47:05 +00:00
|
|
|
/*
|
2013-10-18 11:33:46 +00:00
|
|
|
// ino.method.sc_check.25102.definition
|
2015-04-22 19:40:22 +00:00
|
|
|
public void sc_check(Menge<Class> classname, Hashtable ch, Hashtable<String, String> bh, boolean ext, Hashtable parach,Hashtable<String, Hashtable> parabh)
|
2013-10-18 11:33:46 +00:00
|
|
|
// ino.end
|
|
|
|
// ino.method.sc_check.25102.body
|
|
|
|
{
|
|
|
|
if(ext)
|
|
|
|
{
|
|
|
|
parserlog.debug(" ---BoolLiteral---");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
// ino.end
|
2014-11-04 12:47:05 +00:00
|
|
|
*/
|
2013-10-18 11:33:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
// ino.method.set_Bool.25105.definition
|
|
|
|
public void set_Bool(boolean b)
|
|
|
|
// ino.end
|
|
|
|
// ino.method.set_Bool.25105.body
|
|
|
|
{
|
|
|
|
this.Bool = b;
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ino.method.get_Name.25108.definition
|
|
|
|
public String get_Name()
|
|
|
|
// ino.end
|
|
|
|
// ino.method.get_Name.25108.body
|
|
|
|
{
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) {
|
2014-10-08 17:00:17 +00:00
|
|
|
this.type = assumptions.checkType(new RefType("java.lang.Boolean",this,-1), this);
|
2013-10-18 11:33:46 +00:00
|
|
|
return new ConstraintsSet();
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
|
|
|
if(Bool)return new JavaCodeResult("true");
|
|
|
|
return new JavaCodeResult("false");
|
|
|
|
}
|
|
|
|
|
2014-02-22 03:58:49 +00:00
|
|
|
|
|
|
|
|
|
|
|
@Override
|
2015-04-22 19:40:22 +00:00
|
|
|
public Menge<SyntaxTreeNode> getChildren() {
|
|
|
|
Menge<SyntaxTreeNode> ret = new Menge<SyntaxTreeNode>();
|
2014-02-22 03:58:49 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2014-09-05 09:49:31 +00:00
|
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public void wandleRefTypeAttributes2GenericAttributes(
|
2015-04-22 19:40:22 +00:00
|
|
|
Menge<Type> paralist,
|
|
|
|
Menge<GenericTypeVar> genericMethodParameters) {
|
2014-09-05 09:49:31 +00:00
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
}
|
|
|
|
|
2013-10-18 11:33:46 +00:00
|
|
|
|
|
|
|
}
|
|
|
|
// ino.end
|