/** * 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); }
Type type) { if (type == Type.String) { translateTo(classGen, methodGen, (StringType) type); translateTo(classGen, methodGen, (BooleanType) type); translateTo(classGen, methodGen, (RealType) type); translateTo(classGen, methodGen, (NodeType) type); translateTo(classGen, methodGen, (ReferenceType) type); translateTo(classGen, methodGen, (ObjectType) type); toString(), type.toString()); classGen.getParser().reportError(Constants.FATAL, err);
/** * Translates an object of this type to its boxed representation. */ public void translateBox(ClassGenerator classGen, MethodGenerator methodGen) { translateTo(classGen, methodGen, Type.Reference); }
toString(), clazz.getName()); classGen.getParser().reportError(Constants.FATAL, err);
/** * Translates a node-set into a synthesized boolean. * The boolean value of a node-set is "true" if non-empty * and "false" otherwise. Notice that the * function getFirstNode() is called in translateToDesynthesized(). * * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type) { final InstructionList il = methodGen.getInstructionList(); FlowList falsel = translateToDesynthesized(classGen, methodGen, type); il.append(ICONST_1); final BranchHandle truec = il.append(new GOTO(null)); falsel.backPatch(il.append(ICONST_0)); truec.setTarget(il.append(NOP)); }
/** * 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); }
toString(), className); classGen.getParser().reportError(Constants.FATAL, err);
/** * Translates a node-set into a synthesized boolean. * The boolean value of a node-set is "true" if non-empty * and "false" otherwise. Notice that the * function getFirstNode() is called in translateToDesynthesized(). * * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type) { final InstructionList il = methodGen.getInstructionList(); FlowList falsel = translateToDesynthesized(classGen, methodGen, type); il.append(ICONST_1); final BranchHandle truec = il.append(new GOTO(null)); falsel.backPatch(il.append(ICONST_0)); truec.setTarget(il.append(NOP)); }
Type type) { if (type == Type.String) { translateTo(classGen, methodGen, (StringType) type); translateTo(classGen, methodGen, (BooleanType) type); translateTo(classGen, methodGen, (RealType) type); translateTo(classGen, methodGen, (NodeType) type); translateTo(classGen, methodGen, (ReferenceType) type); translateTo(classGen, methodGen, (ObjectType) type); toString(), type.toString()); classGen.getParser().reportError(Constants.FATAL, err);
/** * Translates a node-set into a non-synthesized boolean. It does not * push a 0 or a 1 but instead returns branchhandle list to be appended * to the false list. * * @see org.apache.xalan.xsltc.compiler.util.Type#translateToDesynthesized */ public FlowList translateToDesynthesized(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type) { final InstructionList il = methodGen.getInstructionList(); getFirstNode(classGen, methodGen); return new FlowList(il.append(new IFLT(null))); }
/** * Translates an object of this type to its boxed representation. */ public void translateBox(ClassGenerator classGen, MethodGenerator methodGen) { translateTo(classGen, methodGen, Type.Reference); }
toString(), clazz.getName()); classGen.getParser().reportError(Constants.FATAL, err);
/** * Translates a node-set into a synthesized boolean. * The boolean value of a node-set is "true" if non-empty * and "false" otherwise. Notice that the * function getFirstNode() is called in translateToDesynthesized(). * * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type) { final InstructionList il = methodGen.getInstructionList(); FlowList falsel = translateToDesynthesized(classGen, methodGen, type); il.append(ICONST_1); final BranchHandle truec = il.append(new GOTO(null)); falsel.backPatch(il.append(ICONST_0)); truec.setTarget(il.append(NOP)); }
Type type) { if (type == Type.String) { translateTo(classGen, methodGen, (StringType) type); translateTo(classGen, methodGen, (BooleanType) type); translateTo(classGen, methodGen, (RealType) type); translateTo(classGen, methodGen, (NodeType) type); translateTo(classGen, methodGen, (ReferenceType) type); translateTo(classGen, methodGen, (ObjectType) type); toString(), type.toString()); classGen.getParser().reportError(Constants.FATAL, err);
/** * Translates a node-set into a string. The string value of a node-set is * value of its first element. * * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, StringType type) { final InstructionList il = methodGen.getInstructionList(); getFirstNode(classGen, methodGen); il.append(DUP); final BranchHandle falsec = il.append(new IFLT(null)); Type.Node.translateTo(classGen, methodGen, type); final BranchHandle truec = il.append(new GOTO(null)); falsec.setTarget(il.append(POP)); il.append(new PUSH(classGen.getConstantPool(), "")); truec.setTarget(il.append(NOP)); }
/** * Translates an object of this type to its boxed representation. */ public void translateBox(ClassGenerator classGen, MethodGenerator methodGen) { translateTo(classGen, methodGen, Type.Reference); }
toString(), clazz.getName()); classGen.getParser().reportError(Constants.FATAL, err);
/** * Translates a node-set into a synthesized boolean. * The boolean value of a node-set is "true" if non-empty * and "false" otherwise. Notice that the * function getFirstNode() is called in translateToDesynthesized(). * * @see org.apache.xalan.xsltc.compiler.util.Type#translateTo */ public void translateTo(ClassGenerator classGen, MethodGenerator methodGen, BooleanType type) { final InstructionList il = methodGen.getInstructionList(); FlowList falsel = translateToDesynthesized(classGen, methodGen, type); il.append(ICONST_1); final BranchHandle truec = il.append(new GOTO(null)); falsel.backPatch(il.append(ICONST_0)); truec.setTarget(il.append(NOP)); }
Type type) { if (type == Type.String) { translateTo(classGen, methodGen, (StringType) type); translateTo(classGen, methodGen, (BooleanType) type); translateTo(classGen, methodGen, (RealType) type); translateTo(classGen, methodGen, (NodeType) type); translateTo(classGen, methodGen, (ReferenceType) type); translateTo(classGen, methodGen, (ObjectType) type); toString(), type.toString()); classGen.getParser().reportError(Constants.FATAL, err);
/** * 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); }