Methods Summary |
---|
public com.sun.org.apache.bcel.internal.generic.Instruction | LOAD(int slot)
return new ALOAD(slot);
|
public com.sun.org.apache.bcel.internal.generic.Instruction | STORE(int slot)
return new ASTORE(slot);
|
public boolean | equals(java.lang.Object obj)
return (obj instanceof ObjectType);
|
public java.lang.Class | getJavaClass()
return _clazz;
|
public java.lang.String | getJavaClassName()
return _javaClassName;
|
public int | hashCode()Must return the same value for all ObjectType instances. This is
needed in CastExpr to ensure the mapping table is used correctly.
return java.lang.Object.class.hashCode();
|
public boolean | identicalTo(com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type other)
return this == other;
|
public com.sun.org.apache.bcel.internal.generic.Type | toJCType()
return Util.getJCRefType(toSignature());
|
public java.lang.String | toSignature()
final StringBuffer result = new StringBuffer("L");
result.append(_javaClassName.replace('.", '/")).append(';");
return result.toString();
|
public java.lang.String | toString()
return _javaClassName;
|
public void | translateFrom(com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator classGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator methodGen, java.lang.Class clazz)Translates an external Java type into an Object type
methodGen.getInstructionList().append(NOP);
|
public void | translateTo(com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator classGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator methodGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.Type type)Translates a void into an object of internal type type .
This translation is needed when calling external functions
that return void.
if (type == Type.String) {
translateTo(classGen, methodGen, (StringType) type);
}
else {
ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR,
toString(), type.toString());
classGen.getParser().reportError(Constants.FATAL, err);
}
|
public void | translateTo(com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator classGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator methodGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.StringType type)Expects an integer on the stack and pushes its string value by calling
Integer.toString(int i) .
final ConstantPoolGen cpg = classGen.getConstantPool();
final InstructionList il = methodGen.getInstructionList();
il.append(DUP);
final BranchHandle ifNull = il.append(new IFNULL(null));
il.append(new INVOKEVIRTUAL(cpg.addMethodref(_javaClassName,
"toString",
"()" + STRING_SIG)));
final BranchHandle gotobh = il.append(new GOTO(null));
ifNull.setTarget(il.append(POP));
il.append(new PUSH(cpg, ""));
gotobh.setTarget(il.append(NOP));
|
public void | translateTo(com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator classGen, com.sun.org.apache.xalan.internal.xsltc.compiler.util.MethodGenerator methodGen, java.lang.Class clazz)Translates an object of this type to the external (Java) type denoted
by clazz . This method is used to translate parameters
when external functions are called.
if (clazz.isAssignableFrom(_clazz))
methodGen.getInstructionList().append(NOP);
else {
ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR,
toString(), clazz.getClass().toString());
classGen.getParser().reportError(Constants.FATAL, err);
}
|