forked from JavaTX/JavaCompilerCore
55 lines
1.4 KiB
Java
Executable File
55 lines
1.4 KiB
Java
Executable File
// ino.module.InterfaceList.8615.package
|
|
package de.dhbwstuttgart.parser;
|
|
// ino.end
|
|
|
|
// ino.module.InterfaceList.8615.import
|
|
import java.util.Vector;
|
|
|
|
import de.dhbwstuttgart.syntaxtree.Interface;
|
|
import de.dhbwstuttgart.syntaxtree.misc.UsedId;
|
|
import de.dhbwstuttgart.syntaxtree.type.RefType;
|
|
import de.dhbwstuttgart.syntaxtree.type.Type;
|
|
|
|
// ino.class.InterfaceList.24383.description type=javadoc
|
|
/**
|
|
* Hilfskonstrukt fuer die Grammatik, um ungepruefte
|
|
* Typcasts fuer Vectoren zu umgehen. Wird nuer fuer den
|
|
* Parser benoetigt.
|
|
* @author SCJU
|
|
*
|
|
*/
|
|
// ino.end
|
|
// ino.class.InterfaceList.24383.declaration
|
|
public class InterfaceList
|
|
// ino.end
|
|
// ino.class.InterfaceList.24383.body
|
|
{
|
|
// ino.attribute.superif.24386.declaration
|
|
private Vector<UsedId> superif = new Vector<UsedId>();
|
|
// ino.end
|
|
|
|
// ino.method.addInterface.24389.definition
|
|
public void addInterface(UsedId uid)
|
|
// ino.end
|
|
// ino.method.addInterface.24389.body
|
|
{
|
|
superif.addElement(uid);
|
|
}
|
|
// ino.end
|
|
|
|
// ino.method.getVector.24392.definition
|
|
public Vector<Type> getTypeVector()
|
|
// ino.end
|
|
// ino.method.getVector.24392.body
|
|
{
|
|
Vector<Type> ret = new Vector<>();
|
|
for(UsedId name : superif){
|
|
ret.add(new Interface(name.get_Name_1Element(), name.getOffset()).getType());
|
|
}
|
|
return ret;
|
|
}
|
|
// ino.end
|
|
|
|
}
|
|
// ino.end
|