2013-10-18 11:33:46 +00:00
|
|
|
// ino.module.This.8654.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.This.8654.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;
|
|
|
|
import de.dhbwstuttgart.myexception.SCStatementException;
|
2014-09-02 08:33:54 +00:00
|
|
|
import de.dhbwstuttgart.syntaxtree.Class;
|
2015-02-25 15:34:29 +00:00
|
|
|
import de.dhbwstuttgart.syntaxtree.Constructor;
|
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.misc.UsedId;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.type.Type;
|
2015-02-26 14:50:23 +00:00
|
|
|
import de.dhbwstuttgart.syntaxtree.type.Void;
|
2014-09-02 08:33:54 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.ConstraintsSet;
|
|
|
|
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
|
|
|
import de.dhbwstuttgart.typeinference.ResultSet;
|
2015-02-26 14:50:23 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.assumptions.ConstructorAssumption;
|
2014-09-02 08:33:54 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions;
|
2015-02-25 15:34:29 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.exceptions.TypeinferenceException;
|
2014-09-05 09:49:31 +00:00
|
|
|
import de.dhbwstuttgart.typeinference.unify.CSubstitutionSet;
|
2013-10-18 11:33:46 +00:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
// ino.class.This.26261.declaration
|
|
|
|
public class This extends Expr
|
|
|
|
// ino.end
|
|
|
|
// ino.class.This.26261.body
|
|
|
|
{
|
|
|
|
// ino.method.This.26265.definition
|
|
|
|
public This(int offset,int variableLength)
|
|
|
|
// ino.end
|
|
|
|
// ino.method.This.26265.body
|
|
|
|
{
|
|
|
|
super(offset,variableLength);
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
2014-04-23 23:53:35 +00:00
|
|
|
public This(SyntaxTreeNode parent){
|
|
|
|
this(0,0);
|
|
|
|
this.parent = parent;
|
|
|
|
}
|
|
|
|
|
2013-10-18 11:33:46 +00:00
|
|
|
// ino.attribute.arglist.26268.declaration
|
|
|
|
public ArgumentList arglist;
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
// ino.attribute.parserlog.26271.declaration
|
|
|
|
protected static Logger parserlog = Logger.getLogger("parser");
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
// ino.method.set_ArgumentList.26274.definition
|
|
|
|
public void set_ArgumentList(ArgumentList al)
|
|
|
|
// ino.end
|
|
|
|
// ino.method.set_ArgumentList.26274.body
|
|
|
|
{
|
|
|
|
this.arglist = al;
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
public ArgumentList getArgumentList()
|
|
|
|
{
|
|
|
|
return this.arglist;
|
|
|
|
}
|
|
|
|
|
|
|
|
// ino.method.set_UsedId.26277.definition
|
|
|
|
public void set_UsedId(UsedId ui)
|
|
|
|
// ino.end
|
|
|
|
// ino.method.set_UsedId.26277.body
|
|
|
|
{
|
|
|
|
this.usedid = ui;
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
2014-11-04 12:47:05 +00:00
|
|
|
/*
|
2013-10-18 11:33:46 +00:00
|
|
|
// ino.method.sc_check.26280.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
|
|
|
throws SCStatementException
|
|
|
|
// ino.end
|
|
|
|
// ino.method.sc_check.26280.body
|
|
|
|
{
|
|
|
|
if(ext)
|
|
|
|
parserlog.debug(" ---This---");
|
|
|
|
}
|
|
|
|
// ino.end
|
2014-11-04 12:47:05 +00:00
|
|
|
*/
|
2013-10-18 11:33:46 +00:00
|
|
|
|
|
|
|
// ino.method.get_Name.26286.definition
|
|
|
|
public String get_Name()
|
|
|
|
// ino.end
|
|
|
|
// ino.method.get_Name.26286.body
|
|
|
|
{ return null; }
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
|
|
|
|
// ino.method.wandleRefTypeAttributes2GenericAttributes.26295.definition
|
2015-04-22 19:40:22 +00:00
|
|
|
public void wandleRefTypeAttributes2GenericAttributes(Menge<Type> paralist, Menge<GenericTypeVar> genericMethodParameters)
|
2013-10-18 11:33:46 +00:00
|
|
|
// ino.end
|
|
|
|
// ino.method.wandleRefTypeAttributes2GenericAttributes.26295.body
|
|
|
|
{
|
|
|
|
}
|
|
|
|
// ino.end
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public ConstraintsSet TYPEExpr(TypeAssumptions assumptions) {
|
|
|
|
ConstraintsSet ret = new ConstraintsSet();
|
|
|
|
//this.set_Type(new);
|
2015-05-12 17:49:27 +00:00
|
|
|
//this.setType(assumptions.getThisValue());//Die Assumption für this als TypeVariable setzen.
|
2014-03-20 10:35:57 +00:00
|
|
|
this.setType(this.getParentClass().getType());
|
2013-10-18 11:33:46 +00:00
|
|
|
return ret;
|
|
|
|
}
|
|
|
|
|
2015-02-25 15:34:29 +00:00
|
|
|
@Override
|
|
|
|
public ConstraintsSet TYPEStmt(TypeAssumptions assumptions) {
|
2015-02-26 14:50:23 +00:00
|
|
|
throw new TypeinferenceException("this ist keine Anweisung", this);
|
2015-02-25 15:34:29 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
public String toString()
|
2013-10-18 11:33:46 +00:00
|
|
|
// ino.end
|
|
|
|
// ino.method.toString.25738.body
|
|
|
|
{
|
|
|
|
//return receiver/*.toString()*/ + " " + usedid.toString();
|
|
|
|
return type + " (" + "this" +"(" + this.getArgumentList() + "))";
|
|
|
|
}
|
|
|
|
|
|
|
|
@Override
|
|
|
|
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
|
|
|
return new JavaCodeResult("this");
|
|
|
|
}
|
|
|
|
|
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;
|
|
|
|
}
|
2015-06-16 12:58:27 +00:00
|
|
|
|
|
|
|
@Override
|
|
|
|
public void genByteCode(ClassGen _cg) {
|
|
|
|
// TODO Auto-generated method stub
|
|
|
|
|
|
|
|
}
|
2014-03-17 16:55:55 +00:00
|
|
|
|
2013-10-18 11:33:46 +00:00
|
|
|
}
|