APIdia Launch Partner
Top Fields Constructors Methods
com.sun.org.apache.xalan.internal.xsltc.compiler

pack-priv final Class Number

extends Instruction
implements Closure
Class Inheritance
All Implemented Interfaces
com.sun.org.apache.xalan.internal.xsltc.compiler.Closure
Imports
com.sun.org.apache.bcel.internal.classfile.Field, com.sun.org.apache.bcel.internal.generic.ALOAD, .ASTORE, .BranchHandle, .CHECKCAST, .ConstantPoolGen, .D2I, .GETFIELD, .GOTO, .IFNONNULL, .ILOAD, .INVOKESPECIAL, .INVOKESTATIC, .INVOKEVIRTUAL, .InstructionList, .LocalVariableGen, .NEW, .PUSH, .PUTFIELD, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator, .MatchGenerator, .MethodGenerator, .NodeCounterGenerator, .RealType, .Type, .TypeCheckError, .Util, java.util.ArrayList, .List

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen

Field Summary

Modifier and TypeField and Description
private String
private List<VariableRefBase>
private Pattern
private AttributeValueTemplate
private boolean
private Pattern
private AttributeValueTemplate
private AttributeValueTemplate
private AttributeValueTemplate
private AttributeValueTemplate
private int
private Expression
private static final String[]
private static final String[]
private static final int
private static final int
private static final int

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public void
private void
compileConstructor(ClassGenerator classGen)

Compiles a constructor for the class _className that inherits from {Any,Single,Multiple}NodeCounter.

private void
private void
compileLocals(NodeCounterGenerator nodeCounterGen, MatchGenerator matchGen, InstructionList il)

This method compiles code that is common to matchesFrom() and matchesCount() in the auxillary class.

private void
public String
getInnerClassName()

Implements com.sun.org.apache.xalan.internal.xsltc.compiler.Closure.getInnerClassName.

Returns the name of the auxiliary class or null if this predicate is compiled inside the Translet.

public Closure
getParentClosure()

Implements com.sun.org.apache.xalan.internal.xsltc.compiler.Closure.getParentClosure.

Returns a reference to its parent closure or null if outermost.

public boolean
hasValue()

True if the has specified a value for this instance of number.

public boolean
inInnerClass()

Implements com.sun.org.apache.xalan.internal.xsltc.compiler.Closure.inInnerClass.

Returns true if this closure is compiled in an inner class (i.e. if this is a real closure).

public boolean
isDefault()

Returns true if this instance of number has neither a from nor a count pattern.

public void
parseContents(Parser parser)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

Parse the contents of this syntax tree nodes (child nodes, XPath expressions, patterns and functions).

public void
translate(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Instruction.translate.

Translate this node into JVM bytecodes.

public Type
typeCheck(SymbolTable stable)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Instruction.typeCheck.

Type check all the children of this node.

Field Detail

_classNameback to summary
private String _className
_closureVarsback to summary
private List<VariableRefBase> _closureVars
_countback to summary
private Pattern _count
_formatback to summary
private AttributeValueTemplate _format
_formatNeededback to summary
private boolean _formatNeeded
_fromback to summary
private Pattern _from
_groupingSeparatorback to summary
private AttributeValueTemplate _groupingSeparator
_groupingSizeback to summary
private AttributeValueTemplate _groupingSize
_langback to summary
private AttributeValueTemplate _lang
_letterValueback to summary
private AttributeValueTemplate _letterValue
_levelback to summary
private int _level
_valueback to summary
private Expression _value
ClassNamesback to summary
private static final String[] ClassNames
FieldNamesback to summary
private static final String[] FieldNames
LEVEL_ANYback to summary
private static final int LEVEL_ANY
LEVEL_MULTIPLEback to summary
private static final int LEVEL_MULTIPLE
LEVEL_SINGLEback to summary
private static final int LEVEL_SINGLE

Constructor Detail

Numberback to summary
pack-priv Number()

Method Detail

addVariableback to summary
public void addVariable(VariableRefBase variableRef)

Implements com.sun.org.apache.xalan.internal.xsltc.compiler.Closure.addVariable.

Add new variable to the closure.

compileConstructorback to summary
private void compileConstructor(ClassGenerator classGen)

Compiles a constructor for the class _className that inherits from {Any,Single,Multiple}NodeCounter. This constructor simply calls the same constructor in the super class.

compileDefaultback to summary
private void compileDefault(ClassGenerator classGen, MethodGenerator methodGen)
compileLocalsback to summary
private void compileLocals(NodeCounterGenerator nodeCounterGen, MatchGenerator matchGen, InstructionList il)

This method compiles code that is common to matchesFrom() and matchesCount() in the auxillary class.

compilePatternsback to summary
private void compilePatterns(ClassGenerator classGen, MethodGenerator methodGen)
getInnerClassNameback to summary
public String getInnerClassName()

Implements com.sun.org.apache.xalan.internal.xsltc.compiler.Closure.getInnerClassName.

Returns the name of the auxiliary class or null if this predicate is compiled inside the Translet.

getParentClosureback to summary
public Closure getParentClosure()

Implements com.sun.org.apache.xalan.internal.xsltc.compiler.Closure.getParentClosure.

Returns a reference to its parent closure or null if outermost.

hasValueback to summary
public boolean hasValue()

True if the has specified a value for this instance of number.

inInnerClassback to summary
public boolean inInnerClass()

Implements com.sun.org.apache.xalan.internal.xsltc.compiler.Closure.inInnerClass.

Returns true if this closure is compiled in an inner class (i.e. if this is a real closure).

isDefaultback to summary
public boolean isDefault()

Returns true if this instance of number has neither a from nor a count pattern.

parseContentsback to summary
public void parseContents(Parser parser)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.SyntaxTreeNode.parseContents.

Parse the contents of this syntax tree nodes (child nodes, XPath expressions, patterns and functions). The default behaviour is to parser the syntax tree node's children (since there are no common expressions, patterns, etc. that can be handled in this base class.

translateback to summary
public void translate(ClassGenerator classGen, MethodGenerator methodGen)

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Instruction.translate.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.Instruction.translate.

Translate this node into JVM bytecodes.

typeCheckback to summary
public Type typeCheck(SymbolTable stable) throws TypeCheckError

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Instruction.typeCheck.

Doc from com.sun.org.apache.xalan.internal.xsltc.compiler.Instruction.typeCheck.

Type check all the children of this node.