/** * Expects a node-set on the stack and pushes a real. * First the node-set is converted to string, and from string to real. * * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type) { translateTo(classGen, methodGen, Type.String); Type.String.translateTo(classGen, methodGen, Type.Real); }
public void addMethod(MethodGenerator methodGen) { Method[] methodsToAdd = methodGen.getGeneratedMethods(this); for (int i = 0; i < methodsToAdd.length; i++) { addMethod(methodsToAdd[i]); } } }
/** * Casts a reference into a Node. * * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, NodeType type) { translateTo(classGen, methodGen, Type.NodeSet); Type.NodeSet.translateTo(classGen, methodGen, type); }
/** * Translates an object of this type to an non-synthesized boolean. It * does not push a 0 or a 1 but instead returns branchhandle list to be * appended to the false list. */ public FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type) { ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR, toString(), type.toString()); classGen.getParser().reportError(Constants.FATAL, err); return null; }
public LocalVariableGen addLocalVariable2(String name, Type type, InstructionHandle start) { LocalVariableGen lvg = super.addLocalVariable(name, type, _slotAllocator.allocateSlot(type), start, null); getLocalVariableRegistry().registerLocalVariable(lvg); return lvg; }
public void removeLocalVariable(LocalVariableGen lvg) { _slotAllocator.releaseSlot(lvg); getLocalVariableRegistry().removeByNameTracking(lvg); super.removeLocalVariable(lvg); }
/** * Expects a node on the stack and pushes a real. * First the node is converted to string, and from string to real. * * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type) { translateTo(classGen, methodGen, Type.String); Type.String.translateTo(classGen, methodGen, Type.Real); }
public org.apache.bcel.generic.Type toJCType() { return Util.getJCRefType(toSignature()); }
public org.apache.bcel.generic.Type toJCType() { return Util.getJCRefType(toSignature()); }
/** * Expects an result tree on the stack and pushes a real. * Translates a result tree into a real by first converting it to string. * * @param classGen A BCEL class generator * @param methodGen A BCEL method generator * @param type An instance of RealType (any) * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, RealType type) { translateTo(classGen, methodGen, Type.String); Type.String.translateTo(classGen, methodGen, Type.Real); }
public LocalVariableGen getLocalVariable(String name) { return getLocalVariableRegistry().lookUpByName(name); }
/** * Translate contents only if this fallback element is put in place of * some unsupported element or non-XSLTC extension element */ public void translate(ClassGenerator classGen, MethodGenerator methodGen) { final ConstantPoolGen cpg = classGen.getConstantPool(); final InstructionList il = methodGen.getInstructionList(); if (_active) translateContents(classGen, methodGen); } }
/** * Translates an object of this type to its boxed representation. */ public void translateBox(ClassGenerator classGen, MethodGenerator methodGen) { translateTo(classGen, methodGen, Type.Reference); }
/** * Get the name of this instruction. Used for debugging. * @return the instruction name */ public String toString(boolean verbose) { return getName(); } }
/** * Translates an object of this type to its boxed representation. */ public void translateBox(ClassGenerator classGen, MethodGenerator methodGen) { translateTo(classGen, methodGen, Type.Reference); }
/** * Translates an object of this type to its boxed representation. */ public void translateBox(ClassGenerator classGen, MethodGenerator methodGen) { translateTo(classGen, methodGen, Type.Reference); }
/** * Expects a node-set on the stack and pushes a node. * * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, NodeType type) { getFirstNode(classGen, methodGen); }
private LocalVariableRegistry getLocalVariableRegistry() { if (_localVariableRegistry == null) { _localVariableRegistry = new LocalVariableRegistry(); } return _localVariableRegistry; }
/** * Translates an object of this type to an object of type * <code>type</code>. * Expects an object of the former type and pushes an object of the latter. */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, Type type) { ErrorMsg err = new ErrorMsg(ErrorMsg.DATA_CONVERSION_ERR, toString(), type.toString()); classGen.getParser().reportError(Constants.FATAL, err); }