Unnötige Typen gelöscht. char, int, bool, etc. Können vom Unify-Algorithmus nicht verwertet werden
This commit is contained in:
parent
356a229573
commit
21cf019ac4
@ -7,7 +7,6 @@ import de.dhbwstuttgart.typeinference.Menge;
|
||||
|
||||
import java.util.Iterator;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.type.BaseType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
||||
import de.dhbwstuttgart.typeinference.ResultSet;
|
||||
|
@ -24,7 +24,6 @@ import de.dhbwstuttgart.syntaxtree.misc.DeclId;
|
||||
import de.dhbwstuttgart.syntaxtree.misc.UsedId;
|
||||
import de.dhbwstuttgart.syntaxtree.modifier.Modifiers;
|
||||
import de.dhbwstuttgart.syntaxtree.modifier.Public;
|
||||
import de.dhbwstuttgart.syntaxtree.type.BooleanType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
|
@ -5,7 +5,6 @@ package de.dhbwstuttgart.syntaxtree.modifier;
|
||||
// ino.module.Modifiers.8588.import
|
||||
import de.dhbwstuttgart.typeinference.Menge;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.type.BaseType;
|
||||
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
||||
import de.dhbwstuttgart.typeinference.ResultSet;
|
||||
// ino.end
|
||||
|
@ -11,7 +11,6 @@ import de.dhbwstuttgart.myexception.CTypeReconstructionException;
|
||||
import de.dhbwstuttgart.myexception.JVMCodeException;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Binary;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Expr;
|
||||
import de.dhbwstuttgart.syntaxtree.type.IntegerType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
import de.dhbwstuttgart.typeinference.ConstraintType;
|
||||
|
@ -5,8 +5,6 @@ import de.dhbwstuttgart.typeinference.Menge;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Expr;
|
||||
import de.dhbwstuttgart.syntaxtree.type.BooleanType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.IntegerType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
import de.dhbwstuttgart.typeinference.ConstraintsSet;
|
||||
import de.dhbwstuttgart.typeinference.SingleConstraint;
|
||||
|
@ -14,7 +14,6 @@ import de.dhbwstuttgart.syntaxtree.statement.Expr;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.NotExpr;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Null;
|
||||
import de.dhbwstuttgart.syntaxtree.statement.Statement;
|
||||
import de.dhbwstuttgart.syntaxtree.type.BooleanType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
import de.dhbwstuttgart.typeinference.ConstraintType;
|
||||
|
@ -10,7 +10,6 @@ import de.dhbwstuttgart.myexception.CTypeReconstructionException;
|
||||
import de.dhbwstuttgart.myexception.JVMCodeException;
|
||||
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;
|
||||
@ -44,7 +43,7 @@ public class BoolLiteral extends Literal
|
||||
super(-1,-1);
|
||||
// #JB# 20.04.2005
|
||||
// ###########################################################
|
||||
this.setType(new BooleanType(this));
|
||||
this.setType(new RefType("Boolean",this,this.getOffset()));
|
||||
//this.setType(new Type("boolean"));
|
||||
// ###########################################################
|
||||
}
|
||||
|
@ -9,7 +9,6 @@ import de.dhbwstuttgart.myexception.CTypeReconstructionException;
|
||||
import de.dhbwstuttgart.myexception.JVMCodeException;
|
||||
import de.dhbwstuttgart.syntaxtree.Class;
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.syntaxtree.type.CharacterType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
@ -43,7 +42,7 @@ public class CharLiteral extends Literal
|
||||
super(-1,-1);
|
||||
// #JB# 20.04.2005
|
||||
// ###########################################################
|
||||
this.setType(new CharacterType(this));
|
||||
this.setType(new RefType("Char",this,this.getOffset()));
|
||||
//this.setType(new Type("char"));
|
||||
// ###########################################################
|
||||
}
|
||||
|
@ -12,10 +12,7 @@ import de.dhbwstuttgart.myexception.CTypeReconstructionException;
|
||||
import de.dhbwstuttgart.myexception.JVMCodeException;
|
||||
import de.dhbwstuttgart.syntaxtree.Class;
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.syntaxtree.type.DoubleType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.type.IntegerType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.LongType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
import de.dhbwstuttgart.typeinference.ConstraintsSet;
|
||||
@ -47,7 +44,7 @@ public class DoubleLiteral extends Literal
|
||||
{
|
||||
super(-1,-1);
|
||||
|
||||
this.setType(new DoubleType(this));
|
||||
this.setType(new RefType("Double",this,this.getOffset()));
|
||||
|
||||
}
|
||||
// ino.end
|
||||
|
@ -11,7 +11,6 @@ import de.dhbwstuttgart.myexception.CTypeReconstructionException;
|
||||
import de.dhbwstuttgart.myexception.JVMCodeException;
|
||||
import de.dhbwstuttgart.syntaxtree.Class;
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.syntaxtree.type.FloatType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
@ -43,7 +42,7 @@ public class FloatLiteral extends Literal
|
||||
{
|
||||
super(-1,-1);
|
||||
|
||||
this.setType(new FloatType(this));
|
||||
this.setType(new RefType("Float",this,this.getOffset()));
|
||||
|
||||
}
|
||||
// ino.end
|
||||
|
@ -18,7 +18,6 @@ import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.syntaxtree.operator.LogOp;
|
||||
import de.dhbwstuttgart.syntaxtree.operator.Operator;
|
||||
import de.dhbwstuttgart.syntaxtree.operator.RelOp;
|
||||
import de.dhbwstuttgart.syntaxtree.type.BooleanType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
|
@ -13,7 +13,6 @@ 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;
|
||||
@ -52,7 +51,7 @@ public class InstanceOf extends BinaryExpr
|
||||
super(offset,variableLength);
|
||||
// #JB# 20.04.2005
|
||||
// ###########################################################
|
||||
this.setType(new BooleanType(this));
|
||||
this.setType(new RefType("Boolean",this,this.getOffset()));
|
||||
//this.setType(new Type("boolean"));
|
||||
// ###########################################################
|
||||
}
|
||||
|
@ -11,7 +11,6 @@ import de.dhbwstuttgart.myexception.JVMCodeException;
|
||||
import de.dhbwstuttgart.syntaxtree.Class;
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.type.IntegerType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
import de.dhbwstuttgart.typeinference.ConstraintsSet;
|
||||
@ -44,7 +43,7 @@ public class IntLiteral extends Literal
|
||||
super(-1,-1);
|
||||
// #JB# 20.04.2005
|
||||
// ###########################################################
|
||||
this.setType(new IntegerType(this));
|
||||
this.setType(new RefType("Integer",this,this.getOffset()));
|
||||
//this.setType(new Type("int"));
|
||||
// ###########################################################
|
||||
}
|
||||
|
@ -12,7 +12,6 @@ import de.dhbwstuttgart.syntaxtree.FormalParameter;
|
||||
import de.dhbwstuttgart.syntaxtree.Method;
|
||||
import de.dhbwstuttgart.syntaxtree.ParameterList;
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.syntaxtree.type.DoubleType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.ExtendsWildcardType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.type.ObjectType;
|
||||
|
@ -13,8 +13,6 @@ import de.dhbwstuttgart.myexception.JVMCodeException;
|
||||
import de.dhbwstuttgart.syntaxtree.Class;
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.type.IntegerType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.LongType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
import de.dhbwstuttgart.typeinference.ConstraintsSet;
|
||||
@ -46,7 +44,7 @@ public class LongLiteral extends Literal
|
||||
{
|
||||
super(-1,-1);
|
||||
|
||||
this.setType(new LongType(this));
|
||||
this.setType(new RefType("Long",this,this.getOffset()));
|
||||
|
||||
}
|
||||
// ino.end
|
||||
|
@ -13,7 +13,6 @@ 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;
|
||||
|
@ -18,7 +18,6 @@ import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.syntaxtree.operator.LogOp;
|
||||
import de.dhbwstuttgart.syntaxtree.operator.Operator;
|
||||
import de.dhbwstuttgart.syntaxtree.operator.RelOp;
|
||||
import de.dhbwstuttgart.syntaxtree.type.BooleanType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.GenericTypeVar;
|
||||
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
||||
import de.dhbwstuttgart.syntaxtree.type.Type;
|
||||
|
@ -1,93 +0,0 @@
|
||||
// ino.module.BaseType.8667.package
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
import de.dhbwstuttgart.core.IItemWithOffset;
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.typeinference.ConstraintType;
|
||||
import de.dhbwstuttgart.typeinference.assumptions.TypeAssumptions;
|
||||
|
||||
// ino.end
|
||||
// ino.class.BaseType.26435.declaration
|
||||
public abstract class BaseType extends Type
|
||||
// ino.end
|
||||
// ino.class.BaseType.26435.body
|
||||
{
|
||||
/**
|
||||
* Ist IsArray auf true, muss beim Codegen ein Zeichen [ gesetzt werden
|
||||
* Bsp.: 15| tag = CONSTANT_Utf8, length = 22, ([Ljava/lang/String;)V
|
||||
* Ist IsArray auf false, muss beim Codegen ein Zeichen [ gesetzt werden
|
||||
* Bsp.: 9| tag = CONSTANT_Utf8, length = 21, (Ljava/lang/String;)V
|
||||
*/
|
||||
private boolean IsArray = false;
|
||||
|
||||
// ino.method.BaseType.26439.definition
|
||||
public BaseType(SyntaxTreeNode parent, int offset)
|
||||
// ino.end
|
||||
// ino.method.BaseType.26439.body
|
||||
{
|
||||
super(parent, offset);
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.BaseType.26442.definition
|
||||
public BaseType(String name,SyntaxTreeNode parent,int offset)
|
||||
// ino.end
|
||||
// ino.method.BaseType.26442.body
|
||||
{
|
||||
super(name,parent, offset);
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.equals.26445.defdescription type=javadoc
|
||||
/**
|
||||
* Author: J�rg B�uerle<br/>
|
||||
* @param Object
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.equals.26445.definition
|
||||
public boolean equals(Object obj)
|
||||
// ino.end
|
||||
// ino.method.equals.26445.body
|
||||
{
|
||||
if(obj instanceof BaseType){
|
||||
return super.equals(obj);
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.clone.26448.declaration
|
||||
public abstract BaseType clone();
|
||||
// ino.end
|
||||
|
||||
/**
|
||||
* Author: Daniel Feinler<br/>
|
||||
* Handelt ab, ob der Typ eines Objekts ein Array ist, wenn true dann
|
||||
* wird im Bytecode ein flag gesetzt wenn nicht, dann halt nicht.
|
||||
* @return the IsArray
|
||||
*/
|
||||
public boolean IsArray() {
|
||||
return IsArray;
|
||||
}
|
||||
|
||||
/**
|
||||
* Author: Daniel Feinler<br/>
|
||||
* Handelt ab, ob der Typ eines Objekts ein Array ist, wenn true dann
|
||||
* wird im Bytecode ein flag gesetzt wenn nicht, dann halt nicht.
|
||||
* @param IsArray the IsArray to set
|
||||
*/
|
||||
public void setArray(boolean IsArray) {
|
||||
this.IsArray = IsArray;
|
||||
}
|
||||
|
||||
@Override
|
||||
public ConstraintType TYPE(TypeAssumptions ass, SyntaxTreeNode parent) {
|
||||
return super.TYPE(ass, parent); //Die Base-Types müssen nicht nachgeschlagen werden.
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
// ino.end
|
@ -1,64 +0,0 @@
|
||||
// ino.module.BooleanType.8668.package
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
||||
import de.dhbwstuttgart.typeinference.ResultSet;
|
||||
|
||||
// ino.end
|
||||
// ino.class.BooleanType.26451.declaration
|
||||
public class BooleanType extends BaseType
|
||||
// ino.end
|
||||
// ino.class.BooleanType.26451.body
|
||||
{
|
||||
// ino.method.BooleanType.26455.definition
|
||||
public BooleanType(SyntaxTreeNode parent)
|
||||
// ino.end
|
||||
// ino.method.BooleanType.26455.body
|
||||
{
|
||||
super("boolean",parent, -1);
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.equals.26458.defdescription type=javadoc
|
||||
/**
|
||||
* Author: J�rg B�uerle<br/>
|
||||
* @param Object
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.equals.26458.definition
|
||||
public boolean equals(Object obj)
|
||||
// ino.end
|
||||
// ino.method.equals.26458.body
|
||||
{
|
||||
if(obj instanceof BooleanType){
|
||||
return super.equals(obj);
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.clone.26461.defdescription type=javadoc
|
||||
/**
|
||||
* <br>Author: J�rg B�uerle
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.clone.26461.definition
|
||||
public BooleanType clone()
|
||||
// ino.end
|
||||
// ino.method.clone.26461.body
|
||||
{
|
||||
return new BooleanType(this.getParent());
|
||||
}
|
||||
// ino.end
|
||||
|
||||
@Override
|
||||
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
||||
return new JavaCodeResult("boolean");
|
||||
}
|
||||
}
|
||||
// ino.end
|
@ -1,64 +0,0 @@
|
||||
// ino.module.CharacterType.8670.package
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
||||
import de.dhbwstuttgart.typeinference.ResultSet;
|
||||
|
||||
// ino.end
|
||||
// ino.class.CharacterType.26492.declaration
|
||||
public class CharacterType extends BaseType
|
||||
// ino.end
|
||||
// ino.class.CharacterType.26492.body
|
||||
{
|
||||
// ino.method.CharacterType.26496.definition
|
||||
public CharacterType(SyntaxTreeNode parent)
|
||||
// ino.end
|
||||
// ino.method.CharacterType.26496.body
|
||||
{
|
||||
super("char",parent,-1);
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.equals.26499.defdescription type=javadoc
|
||||
/**
|
||||
* Author: J�rg B�uerle<br/>
|
||||
* @param Object
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.equals.26499.definition
|
||||
public boolean equals(Object obj)
|
||||
// ino.end
|
||||
// ino.method.equals.26499.body
|
||||
{
|
||||
if(obj instanceof CharacterType){
|
||||
return super.equals(obj);
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.clone.26502.defdescription type=javadoc
|
||||
/**
|
||||
* <br>Author: J�rg B�uerle
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.clone.26502.definition
|
||||
public CharacterType clone()
|
||||
// ino.end
|
||||
// ino.method.clone.26502.body
|
||||
{
|
||||
return new CharacterType(this.getParent());
|
||||
}
|
||||
// ino.end
|
||||
|
||||
@Override
|
||||
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
||||
return new JavaCodeResult("char");
|
||||
}
|
||||
}
|
||||
// ino.end
|
@ -1,64 +0,0 @@
|
||||
// ino.module.IntegerType.8672.package
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
||||
import de.dhbwstuttgart.typeinference.ResultSet;
|
||||
|
||||
// ino.end
|
||||
// ino.class.IntegerType.26527.declaration
|
||||
public class DoubleType extends BaseType
|
||||
// ino.end
|
||||
// ino.class.IntegerType.26527.body
|
||||
{
|
||||
// ino.method.IntegerType.26531.definition
|
||||
public DoubleType(SyntaxTreeNode parent)
|
||||
// ino.end
|
||||
// ino.method.IntegerType.26531.body
|
||||
{
|
||||
super("double",parent,-1);
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.equals.26534.defdescription type=javadoc
|
||||
/**
|
||||
* Author: J�rg B�uerle<br/>
|
||||
* @param Object
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.equals.26534.definition
|
||||
public boolean equals(Object obj)
|
||||
// ino.end
|
||||
// ino.method.equals.26534.body
|
||||
{
|
||||
if(obj instanceof DoubleType){
|
||||
return super.equals(obj);
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.clone.26537.defdescription type=javadoc
|
||||
/**
|
||||
* <br>Author: J�rg B�uerle
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.clone.26537.definition
|
||||
public DoubleType clone()
|
||||
// ino.end
|
||||
// ino.method.clone.26537.body
|
||||
{
|
||||
return new DoubleType(this.getParent());
|
||||
}
|
||||
// ino.end
|
||||
|
||||
@Override
|
||||
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
||||
return new JavaCodeResult("double");
|
||||
}
|
||||
}
|
||||
// ino.end
|
@ -1,64 +0,0 @@
|
||||
// ino.module.IntegerType.8672.package
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
||||
import de.dhbwstuttgart.typeinference.ResultSet;
|
||||
|
||||
// ino.end
|
||||
// ino.class.IntegerType.26527.declaration
|
||||
public class FloatType extends BaseType
|
||||
// ino.end
|
||||
// ino.class.IntegerType.26527.body
|
||||
{
|
||||
// ino.method.IntegerType.26531.definition
|
||||
public FloatType(SyntaxTreeNode parent)
|
||||
// ino.end
|
||||
// ino.method.IntegerType.26531.body
|
||||
{
|
||||
super("float", parent,-1);
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.equals.26534.defdescription type=javadoc
|
||||
/**
|
||||
* Author: J�rg B�uerle<br/>
|
||||
* @param Object
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.equals.26534.definition
|
||||
public boolean equals(Object obj)
|
||||
// ino.end
|
||||
// ino.method.equals.26534.body
|
||||
{
|
||||
if(obj instanceof FloatType){
|
||||
return super.equals(obj);
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.clone.26537.defdescription type=javadoc
|
||||
/**
|
||||
* <br>Author: J�rg B�uerle
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.clone.26537.definition
|
||||
public FloatType clone()
|
||||
// ino.end
|
||||
// ino.method.clone.26537.body
|
||||
{
|
||||
return new FloatType(this.getParent());
|
||||
}
|
||||
// ino.end
|
||||
|
||||
@Override
|
||||
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
||||
return new JavaCodeResult("float");
|
||||
}
|
||||
}
|
||||
// ino.end
|
@ -7,8 +7,8 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc
|
||||
private ObjectType extendsBoundType;
|
||||
|
||||
/**
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Standard Konstruktor für eine FreshExtendsWildcard
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Standard Konstruktor für eine FreshExtendsWildcard
|
||||
*/
|
||||
public FreshExtendsWildcardType(ObjectType extendsBound,SyntaxTreeNode parent ,int offset)
|
||||
{
|
||||
@ -17,8 +17,8 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc
|
||||
}
|
||||
|
||||
/**
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Privater Konstruktor für clone
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Privater Konstruktor für clone
|
||||
*/
|
||||
private FreshExtendsWildcardType(ObjectType extendsBound ,SyntaxTreeNode parent,int offset, String name)
|
||||
{
|
||||
@ -27,8 +27,8 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc
|
||||
}
|
||||
|
||||
/**
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Gibt String Entsprechung zurück.
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Gibt String Entsprechung zurück.
|
||||
*/
|
||||
public String toString()
|
||||
{
|
||||
@ -40,8 +40,8 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc
|
||||
}
|
||||
|
||||
/**
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Gibt einen Klon der Wildcard zurück.
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Gibt einen Klon der Wildcard zurück.
|
||||
* Der Innere Typ wird auch geklont
|
||||
*/
|
||||
public FreshExtendsWildcardType clone()
|
||||
@ -50,8 +50,8 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc
|
||||
}
|
||||
|
||||
/**
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Gibt die Grenze der Wildcard zurück
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Gibt die Grenze der Wildcard zurück
|
||||
*/
|
||||
public ObjectType get_ExtendsBound()
|
||||
{
|
||||
@ -59,8 +59,8 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc
|
||||
}
|
||||
|
||||
/**
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Prüft, ob zwei Objekte gleich sind. NICHT INSTANZGLEICH
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Prüft, ob zwei Objekte gleich sind. NICHT INSTANZGLEICH
|
||||
*/
|
||||
public boolean equals(Object obj)
|
||||
{
|
||||
@ -74,9 +74,9 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc
|
||||
}
|
||||
|
||||
/**
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Gibt die passende ExtendsWildcardType Klasse zurück.
|
||||
* Wird für smaller4 verwendet
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Gibt die passende ExtendsWildcardType Klasse zurück.
|
||||
* Wird für smaller4 verwendet
|
||||
*/
|
||||
public ExtendsWildcardType get_WildcardType()
|
||||
{
|
||||
@ -84,9 +84,9 @@ public class FreshExtendsWildcardType extends FreshWildcardType implements IMatc
|
||||
}
|
||||
|
||||
/**
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Gibt den Typen zurück, der bei einem match im Unify verwendet werden soll.
|
||||
* Wird über IMatchable implementiert.
|
||||
* Author: Arne Lüdtke<br/>
|
||||
* Gibt den Typen zurück, der bei einem match im Unify verwendet werden soll.
|
||||
* Wird über IMatchable implementiert.
|
||||
*/
|
||||
public Type getMatchType()
|
||||
{
|
||||
|
@ -1,64 +0,0 @@
|
||||
// ino.module.IntegerType.8672.package
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
||||
import de.dhbwstuttgart.typeinference.ResultSet;
|
||||
|
||||
// ino.end
|
||||
// ino.class.IntegerType.26527.declaration
|
||||
public class IntegerType extends BaseType
|
||||
// ino.end
|
||||
// ino.class.IntegerType.26527.body
|
||||
{
|
||||
// ino.method.IntegerType.26531.definition
|
||||
public IntegerType(SyntaxTreeNode parent)
|
||||
// ino.end
|
||||
// ino.method.IntegerType.26531.body
|
||||
{
|
||||
super("int",parent,-1);
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.equals.26534.defdescription type=javadoc
|
||||
/**
|
||||
* Author: J�rg B�uerle<br/>
|
||||
* @param Object
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.equals.26534.definition
|
||||
public boolean equals(Object obj)
|
||||
// ino.end
|
||||
// ino.method.equals.26534.body
|
||||
{
|
||||
if(obj instanceof IntegerType){
|
||||
return super.equals(obj);
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.clone.26537.defdescription type=javadoc
|
||||
/**
|
||||
* <br>Author: J�rg B�uerle
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.clone.26537.definition
|
||||
public IntegerType clone()
|
||||
// ino.end
|
||||
// ino.method.clone.26537.body
|
||||
{
|
||||
return new IntegerType(this.getParent());
|
||||
}
|
||||
// ino.end
|
||||
|
||||
@Override
|
||||
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
||||
return new JavaCodeResult("int");
|
||||
}
|
||||
}
|
||||
// ino.end
|
@ -1,65 +0,0 @@
|
||||
// ino.module.IntegerType.8672.package
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
import de.dhbwstuttgart.syntaxtree.SyntaxTreeNode;
|
||||
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
||||
import de.dhbwstuttgart.typeinference.ResultSet;
|
||||
|
||||
// ino.end
|
||||
// ino.class.IntegerType.26527.declaration
|
||||
public class LongType extends BaseType
|
||||
// ino.end
|
||||
// ino.class.IntegerType.26527.body
|
||||
{
|
||||
// ino.method.IntegerType.26531.definition
|
||||
public LongType(SyntaxTreeNode parent)
|
||||
// ino.end
|
||||
// ino.method.IntegerType.26531.body
|
||||
{
|
||||
super("long", parent,-1);
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.equals.26534.defdescription type=javadoc
|
||||
/**
|
||||
* Author: J�rg B�uerle<br/>
|
||||
* @param Object
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.equals.26534.definition
|
||||
public boolean equals(Object obj)
|
||||
// ino.end
|
||||
// ino.method.equals.26534.body
|
||||
{
|
||||
if(obj instanceof LongType){
|
||||
return super.equals(obj);
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.clone.26537.defdescription type=javadoc
|
||||
/**
|
||||
* <br>Author: J�rg B�uerle
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.clone.26537.definition
|
||||
public LongType clone()
|
||||
// ino.end
|
||||
// ino.method.clone.26537.body
|
||||
{
|
||||
return new LongType(this.getParent());
|
||||
}
|
||||
// ino.end
|
||||
|
||||
@Override
|
||||
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// ino.end
|
@ -1,64 +0,0 @@
|
||||
// ino.module.ReturnType.8676.package
|
||||
package de.dhbwstuttgart.syntaxtree.type;
|
||||
|
||||
import de.dhbwstuttgart.typeinference.JavaCodeResult;
|
||||
import de.dhbwstuttgart.typeinference.ResultSet;
|
||||
|
||||
// ino.end
|
||||
// ino.class.ReturnType.26703.declaration
|
||||
public class ReturnType extends Type
|
||||
// ino.end
|
||||
// ino.class.ReturnType.26703.body
|
||||
{
|
||||
// ino.method.ReturnType.26707.definition
|
||||
public ReturnType(int offset)
|
||||
// ino.end
|
||||
// ino.method.ReturnType.26707.body
|
||||
{
|
||||
super(null,offset);
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.equals.26710.defdescription type=javadoc
|
||||
/**
|
||||
* Author: J�rg B�uerle<br/>
|
||||
* @param Object
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.equals.26710.definition
|
||||
public boolean equals(Object obj)
|
||||
// ino.end
|
||||
// ino.method.equals.26710.body
|
||||
{
|
||||
if(obj instanceof ReturnType){
|
||||
return super.equals(obj);
|
||||
}
|
||||
else{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
// ino.end
|
||||
|
||||
// ino.method.clone.26713.defdescription type=javadoc
|
||||
/**
|
||||
* <br>Author: J�rg B�uerle
|
||||
* @return
|
||||
*/
|
||||
// ino.end
|
||||
// ino.method.clone.26713.definition
|
||||
public ReturnType clone()
|
||||
// ino.end
|
||||
// ino.method.clone.26713.body
|
||||
{
|
||||
return new ReturnType(getOffset());
|
||||
}
|
||||
// ino.end
|
||||
|
||||
@Override
|
||||
public JavaCodeResult printJavaCode(ResultSet resultSet) {
|
||||
// TODO Auto-generated method stub
|
||||
return null;
|
||||
}
|
||||
}
|
||||
// ino.end
|
Loading…
Reference in New Issue
Block a user