net.sf.fikin.ant
Class XPathTask.Function

java.lang.Object
  extended by net.sf.fikin.ant.types.IfUnless
      extended by net.sf.fikin.ant.types.Namespace
          extended by net.sf.fikin.ant.XPathTask.Function
All Implemented Interfaces:
Type
Enclosing class:
XPathTask

public class XPathTask.Function
extends Namespace

Represent a function tag created on Jan 3, 2007

Since:
Version:
$Revision: 1.7 $
Author:
fiykov

Constructor Summary
XPathTask.Function()
           
 
Method Summary
 void check(org.apache.tools.ant.Task task)
          check if parent is ok and classname has been set test classname and name has been given test that classname is present in classpath and object can be instantiated
 java.lang.String getClassname()
           
 boolean getIsReusable()
           
 java.lang.String getName()
           
 javax.xml.xpath.XPathFunction getXPathFunction()
           
 void setClassname(java.lang.String fqclsname)
          set classname of the function
 void setIsReusable(boolean flg)
          is the function object reusable i.e.
 void setName(java.lang.String name)
          function name in xpath
 
Methods inherited from class net.sf.fikin.ant.types.Namespace
getPrefix, getUri, setPrefix, setUri
 
Methods inherited from class net.sf.fikin.ant.types.IfUnless
setIf, setUnless, shouldUse
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XPathTask.Function

public XPathTask.Function()
Method Detail

setClassname

public void setClassname(java.lang.String fqclsname)
set classname of the function

Parameters:
fqclsname - of the function
Ant Task Param Required:
true

getClassname

public java.lang.String getClassname()
Returns:
function class name

setName

public void setName(java.lang.String name)
function name in xpath

Parameters:
name -

getName

public java.lang.String getName()
Returns:
function name in xpath

setIsReusable

public void setIsReusable(boolean flg)
is the function object reusable i.e. one and same object used in multiple xpath calls

by default true

Parameters:
flg - true if function object is reusable i.e. stateless

getIsReusable

public boolean getIsReusable()
Returns:
is function object reusable, by default true

check

public void check(org.apache.tools.ant.Task task)
           throws org.apache.tools.ant.BuildException
check if parent is ok and classname has been set test classname and name has been given test that classname is present in classpath and object can be instantiated

Specified by:
check in interface Type
Overrides:
check in class Namespace
Parameters:
task - is enclosing ant task
Throws:
org.apache.tools.ant.BuildException

getXPathFunction

public javax.xml.xpath.XPathFunction getXPathFunction()
                                               throws java.lang.NullPointerException
Returns:
reusable function object or new instance of it
Throws:
javax.xml.xpath.XPathFunctionException
java.lang.NullPointerException


Copyright © 2003-2007 Nikolay Fiykov. All Rights Reserved.