forked from JavaTX/JavaCompilerCore
SourcePatchPoint eingeführt
This commit is contained in:
parent
edfa85df7f
commit
2ce0fd4dcd
21
src/mycompiler/myclass/GenericDeclarationList.java
Normal file
21
src/mycompiler/myclass/GenericDeclarationList.java
Normal file
@ -0,0 +1,21 @@
|
||||
package mycompiler.myclass;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import mycompiler.mytype.GenericTypeVar;
|
||||
|
||||
|
||||
/**
|
||||
* Stellt eine Deklarations-Liste von Generischen Variablen dar.
|
||||
* Kann vor Methoden und Klassen auftauchen. (<....>)
|
||||
* @author janulrich
|
||||
*
|
||||
*/
|
||||
public class GenericDeclarationList extends Vector<GenericTypeVar>{
|
||||
|
||||
public GenericDeclarationList(Vector<GenericTypeVar> vector) {
|
||||
// TODO Auto-generated constructor stub
|
||||
}
|
||||
|
||||
|
||||
}
|
25
src/typinferenz/typedeployment/GenericVarPatch.java
Normal file
25
src/typinferenz/typedeployment/GenericVarPatch.java
Normal file
@ -0,0 +1,25 @@
|
||||
package typinferenz.typedeployment;
|
||||
|
||||
import java.util.Vector;
|
||||
|
||||
import mycompiler.mytype.Pair;
|
||||
|
||||
/**
|
||||
* Eine Hilfsklasse zur Einsetzung einer Generischen Variable.
|
||||
* @author janulrich
|
||||
*
|
||||
*/
|
||||
public class GenericVarPatch {
|
||||
|
||||
private Vector<Pair> genericPairs = new Vector<Pair>();
|
||||
|
||||
/**
|
||||
* Fügt eine generische Variable in Form eines Pairs an.
|
||||
* @param p
|
||||
*/
|
||||
public void add(Pair p){
|
||||
if(!this.genericPairs.contains(p))this.genericPairs.add(p);
|
||||
}
|
||||
|
||||
|
||||
}
|
29
src/typinferenz/typedeployment/SourcePatchPoint.java
Normal file
29
src/typinferenz/typedeployment/SourcePatchPoint.java
Normal file
@ -0,0 +1,29 @@
|
||||
package typinferenz.typedeployment;
|
||||
|
||||
import typinferenz.JavaCodeResult;
|
||||
import typinferenz.ResultSet;
|
||||
import typinferenz.TypeInsertable;
|
||||
|
||||
public abstract class SourcePatchPoint implements Comparable<SourcePatchPoint>{
|
||||
protected TypeInsertable point;
|
||||
protected ResultSet resultSet;
|
||||
public abstract int getOffset();
|
||||
public ResultSet getResultSet() {
|
||||
return resultSet;
|
||||
}
|
||||
public TypeInsertable getTIP() {
|
||||
return point;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int compareTo(SourcePatchPoint arg0) {
|
||||
return new Integer(this.getOffset()).compareTo(new Integer(arg0.getOffset()));
|
||||
}
|
||||
public JavaCodeResult patch(String fileContent, int additionalOffset) {
|
||||
return new JavaCodeResult(fileContent);
|
||||
}
|
||||
public int getInsertLength() {
|
||||
return 0;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user