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

pack-priv final Class FunctionAvailableCall

extends FunctionCall
Class Inheritance
Imports
com.sun.org.apache.bcel.internal.generic.ConstantPoolGen, .PUSH, com.sun.org.apache.xalan.internal.utils.ObjectFactory, com.sun.org.apache.xalan.internal.xsltc.compiler.util.ClassGenerator, .ErrorMsg, .MethodGenerator, .Type, .TypeCheckError, .Util, java.lang.reflect.Method, .Modifier, java.util.List

Authors
G. Todd Miller, Santiago Pericas-Geertsen

Field Summary

Modifier and TypeField and Description
private Expression
private boolean
private String
private String
Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.FunctionCall:
_thisArgumentEXSLT_COMMONEXSLT_DATETIMEEXSLT_MATHEXSLT_SETSEXSLT_STRINGSEXT_XALANEXT_XSLTCJAVA_EXT_XALANJAVA_EXT_XALAN_OLDJAVA_EXT_XSLTCNAMESPACE_FORMAT_CLASSNAMESPACE_FORMAT_CLASS_OR_PACKAGENAMESPACE_FORMAT_JAVANAMESPACE_FORMAT_PACKAGEXALAN_CLASSPACKAGE_NAMESPACE

Constructor Summary

AccessConstructor and Description
public
FunctionAvailableCall(QName fname, List<Expression> arguments)

Constructs a FunctionAvailableCall FunctionCall.

Method Summary

Modifier and TypeMethod and Description
public Object
evaluateAtCompileTime()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.evaluateAtCompileTime.

Returns an object representing the compile-time evaluation of an expression.

public boolean
getResult()

Reports on whether the function specified in the argument to xslt function 'function-available' was found.

private boolean
hasMethods()

for external java functions only: reports on whether or not the specified method is found in the specifed class.

private boolean
isInternalNamespace()

Return true if the namespace uri is null or it is the XSLTC translet uri.

public void
translate(ClassGenerator classGen, MethodGenerator methodGen)

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

Calls to 'function-available' are resolved at compile time since the namespaces declared in the stylsheet are not available at run time.

public Type
typeCheck(SymbolTable stable)

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

Argument of function-available call must be literal, typecheck returns the type of function-available to be boolean.

Inherited from com.sun.org.apache.xalan.internal.xsltc.compiler.FunctionCall:
argumentargumentargumentCountgetClassNameFromUrigetNamegetSignaturegetSignaturegetSignatureisExtensionisStandardreplaceDashsetArgumentsetParsertoStringtranslateDesynthesizedtypeCheckArgstypeCheckConstructortypeCheckExternaltypeCheckStandard

Field Detail

_argback to summary
private Expression _arg
_isFunctionAvailableback to summary
private boolean _isFunctionAvailable
_nameOfFunctback to summary
private String _nameOfFunct
_namespaceOfFunctback to summary
private String _namespaceOfFunct

Constructor Detail

FunctionAvailableCallback to summary
public FunctionAvailableCall(QName fname, List<Expression> arguments)

Constructs a FunctionAvailableCall FunctionCall. Takes the function name qname, for example, 'function-available', and a list of arguments where the arguments must be instances of LiteralExpression.

Method Detail

evaluateAtCompileTimeback to summary
public Object evaluateAtCompileTime()

Overrides com.sun.org.apache.xalan.internal.xsltc.compiler.Expression.evaluateAtCompileTime.

Returns an object representing the compile-time evaluation of an expression. We are only using this for function-available and element-available at this time.

getResultback to summary
public boolean getResult()

Reports on whether the function specified in the argument to xslt function 'function-available' was found.

hasMethodsback to summary
private boolean hasMethods()

for external java functions only: reports on whether or not the specified method is found in the specifed class.

isInternalNamespaceback to summary
private boolean isInternalNamespace()

Return true if the namespace uri is null or it is the XSLTC translet uri.

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

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

Calls to 'function-available' are resolved at compile time since the namespaces declared in the stylsheet are not available at run time. Consequently, arguments to this function must be literals.

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

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

Argument of function-available call must be literal, typecheck returns the type of function-available to be boolean.