forked from JavaTX/JavaCompilerCore
123 lines
3.2 KiB
Java
123 lines
3.2 KiB
Java
|
// ino.module.Key.8548.package
|
||
|
package mycompiler.mybytecode;
|
||
|
// ino.end
|
||
|
|
||
|
// ino.module.Key.8548.import
|
||
|
import java.io.FileOutputStream;
|
||
|
import org.apache.log4j.Logger;
|
||
|
// ino.end
|
||
|
|
||
|
// ino.class.Key.22890.declaration
|
||
|
public class Key
|
||
|
// ino.end
|
||
|
// ino.class.Key.22890.body
|
||
|
{
|
||
|
// ino.attribute.tag.22893.declaration
|
||
|
private byte tag;
|
||
|
// ino.end
|
||
|
// ino.attribute.a.22896.declaration
|
||
|
private String a;
|
||
|
// ino.end
|
||
|
// ino.attribute.codegenlog.22899.decldescription type=line
|
||
|
// Logger fuer Code-Gen
|
||
|
// ino.end
|
||
|
// ino.attribute.codegenlog.22899.declaration
|
||
|
protected static Logger codegenlog = Logger.getLogger("codegen");
|
||
|
// ino.end
|
||
|
|
||
|
// ino.method.Key.22902.definition
|
||
|
public Key(byte t, String a)
|
||
|
// ino.end
|
||
|
// ino.method.Key.22902.body
|
||
|
{
|
||
|
this.tag = t;
|
||
|
this.a = a;
|
||
|
}
|
||
|
// ino.end
|
||
|
|
||
|
// ino.method.equals.22905.definition
|
||
|
public boolean equals(Object obj)
|
||
|
// ino.end
|
||
|
// ino.method.equals.22905.body
|
||
|
{
|
||
|
if (obj instanceof Key) {
|
||
|
Key key_object = (Key) obj;
|
||
|
if (this.tag == key_object.get_tag()
|
||
|
&& this.a.equals(key_object.get_a()))
|
||
|
return true;
|
||
|
}
|
||
|
return false;
|
||
|
}
|
||
|
// ino.end
|
||
|
|
||
|
// ino.method.get_tag.22908.definition
|
||
|
public byte get_tag()
|
||
|
// ino.end
|
||
|
// ino.method.get_tag.22908.body
|
||
|
{
|
||
|
return tag;
|
||
|
}
|
||
|
// ino.end
|
||
|
|
||
|
// ino.method.get_a.22911.definition
|
||
|
public String get_a()
|
||
|
// ino.end
|
||
|
// ino.method.get_a.22911.body
|
||
|
{
|
||
|
return a;
|
||
|
}
|
||
|
// ino.end
|
||
|
|
||
|
// ino.method.set_tag.22914.definition
|
||
|
public void set_tag(byte t)
|
||
|
// ino.end
|
||
|
// ino.method.set_tag.22914.body
|
||
|
{
|
||
|
this.tag = t;
|
||
|
}
|
||
|
// ino.end
|
||
|
|
||
|
// ino.method.set_a.22917.definition
|
||
|
public void set_a(String s)
|
||
|
// ino.end
|
||
|
// ino.method.set_a.22917.body
|
||
|
{
|
||
|
this.a = s;
|
||
|
}
|
||
|
// ino.end
|
||
|
|
||
|
// ino.method.codegen.22920.definition
|
||
|
public void codegen(ClassFile classfile, FileOutputStream f)
|
||
|
// ino.end
|
||
|
// ino.method.codegen.22920.body
|
||
|
{
|
||
|
String tag_string = new String();
|
||
|
if (tag == (byte) 1)
|
||
|
tag_string = "CONSTANT_Utf8";
|
||
|
else if (tag == JVMCode.CONSTANT_Integer)
|
||
|
tag_string = "CONSTANT_Integer";
|
||
|
else if (tag == JVMCode.CONSTANT_Float)
|
||
|
tag_string = "CONSTANT_Float";
|
||
|
else if (tag == JVMCode.CONSTANT_Long)
|
||
|
tag_string = "CONSTANT_Long";
|
||
|
else if (tag == JVMCode.CONSTANT_Double)
|
||
|
tag_string = "CONSTANT_Double";
|
||
|
else if (tag == JVMCode.CONSTANT_Class)
|
||
|
tag_string = "CONSTANT_Class";
|
||
|
else if (tag == JVMCode.CONSTANT_String)
|
||
|
tag_string = "CONSTANT_String";
|
||
|
else if (tag == JVMCode.CONSTANT_Fieldref)
|
||
|
tag_string = "CONSTANT_Fieldref";
|
||
|
else if (tag == JVMCode.CONSTANT_Methodref)
|
||
|
tag_string = "CONSTANT_Methodref";
|
||
|
else if (tag == JVMCode.CONSTANT_InterfaceMethodref)
|
||
|
tag_string = "CONSTANT_InterfaceMethodref";
|
||
|
else if (tag == JVMCode.CONSTANT_NameAndType)
|
||
|
tag_string = "CONSTANT_NameAndType";
|
||
|
|
||
|
codegenlog.debug(tag_string + " " + a);
|
||
|
}
|
||
|
// ino.end
|
||
|
}
|
||
|
// ino.end
|