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

pack-priv final Class LiteralAttribute

extends Instruction
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.ConstantPoolGen, .InstructionList, .PUSH, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator, .MethodGenerator, .Type, .TypeCheckError, .Util, com.sun.org.apache.xml.internal.serializer.ElemDesc, .SerializationHandler

Authors
Jacek Ambroziak, Santiago Pericas-Geertsen, Morten Jorgensen

Field Summary

Modifier and TypeField and Description
private final String
private final AttributeValue

Constructor Summary

AccessConstructor and Description
public
LiteralAttribute(String
the attribute name (incl. prefix) as a String.
name
,
String
the attribute value.
value
,
Parser
the XSLT parser (wraps XPath parser).
parser
,
SyntaxTreeNode parent)

Creates a new literal attribute (but does not insert it into the AST).

Method Summary

Modifier and TypeMethod and Description
protected boolean
contextDependent()

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

Returns true if this expression/instruction depends on the context.

public void
display(int indent)

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

Displays the contents of this syntax tree node (to stdout).

public String
getName()

Return the name of the attribute

public AttributeValue
getValue()

Return the value of the attribute

private boolean
hasBadChars(String value)

Return true if at least one character in the String is considered to be a "bad" character.

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

_nameback to summary
private final String _name
_valueback to summary
private final AttributeValue _value

Constructor Detail

LiteralAttributeback to summary
public LiteralAttribute(String name, String value, Parser parser, SyntaxTreeNode parent)

Creates a new literal attribute (but does not insert it into the AST).

Parameters
name:String

the attribute name (incl. prefix) as a String.

value:String

the attribute value.

parser:Parser

the XSLT parser (wraps XPath parser).

Method Detail

contextDependentback to summary
protected boolean contextDependent()

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

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

Returns true if this expression/instruction depends on the context. By default, every expression/instruction depends on the context unless it overrides this method. Currently used to determine if result trees are compiled using procedures or little DOMs (result tree fragments).

displayback to summary
public void display(int indent)

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

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

Displays the contents of this syntax tree node (to stdout). This method is intended for debugging _only_, and should be overridden by all syntax tree node implementations.

getNameback to summary
public String getName()

Return the name of the attribute

getValueback to summary
public AttributeValue getValue()

Return the value of the attribute

hasBadCharsback to summary
private boolean hasBadChars(String value)

Return true if at least one character in the String is considered to be a "bad" character. A bad character is one whose code is: less than 32 (a space), or greater than 126, or it is one of '<', '>', '&' or '\"'. This helps the serializer to decide whether the String needs to be escaped.

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.