68 lines
1.9 KiB
Plaintext
68 lines
1.9 KiB
Plaintext
|
package slangc.bytecode;
|
||
|
|
||
|
public interface StackMachineVisitor {
|
||
|
public enum ProtectionType {
|
||
|
PRIVATE,
|
||
|
PROTECTED,
|
||
|
DEFAULT,
|
||
|
PUBLIC
|
||
|
}
|
||
|
public interface VisitorWithAttributes extends StackMachineVisitor {
|
||
|
void setProtectionType(ProtectionType t);
|
||
|
}
|
||
|
public interface SystemVisitor extends StackMachineVisitor {
|
||
|
TypeVisitor beginType(TypeReference reference);
|
||
|
}
|
||
|
public interface TypeVisitor extends VisitorWithAttributes {
|
||
|
void setSourceFile(String filename);
|
||
|
void setBaseType(TypeReference reference);
|
||
|
void setInterfaceTypes(TypeReference[] interfaces);
|
||
|
void setOuterType(TypeReference reference);
|
||
|
FieldVisitor beginField(FieldReference reference);
|
||
|
MethodVisitor beginMethod(MethodReference reference);
|
||
|
}
|
||
|
public interface FieldVisitor extends VisitorWithAttributes {
|
||
|
|
||
|
}
|
||
|
public interface MethodVisitor extends VisitorWithAttributes {
|
||
|
InstructionTarget beginInstructions();
|
||
|
}
|
||
|
public interface InstructionTarget extends StackMachineVisitor {
|
||
|
public void setSourceLine(int lineNumber);
|
||
|
public void labelHere(LabelReference reference);
|
||
|
public LabelReference newLabel(String debugName);
|
||
|
}
|
||
|
|
||
|
public interface Reference {
|
||
|
|
||
|
}
|
||
|
|
||
|
public interface TypeReference extends Reference {
|
||
|
|
||
|
}
|
||
|
|
||
|
public interface FieldReference extends Reference {
|
||
|
|
||
|
}
|
||
|
|
||
|
public interface MethodReference extends Reference {
|
||
|
|
||
|
}
|
||
|
|
||
|
public interface LocalReference extends Reference {
|
||
|
|
||
|
}
|
||
|
|
||
|
public interface LabelReference extends Reference {
|
||
|
|
||
|
}
|
||
|
|
||
|
public FieldReference getFieldReference(TypeReference owner, boolean isStatic, TypeReference type, String name);
|
||
|
public MethodReference getMethodReference(TypeReference owner, boolean isStatic, TypeReference returnType, String name, TypeReference[] argumentTypes);
|
||
|
|
||
|
public TypeReference voidTypeReference();
|
||
|
public TypeReference getTypeReference(String packageName, String typeName);
|
||
|
|
||
|
void finish();
|
||
|
}
|