Package org.apache.commons.jxpath.functions

# Class ConstructorFunction

java.lang.Object
org.apache.commons.jxpath.functions.ConstructorFunction

All Implemented Interfaces:
  `Function`

public class ConstructorFunction extends Object implements Function
An extension function that creates an instance using a constructor.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `ConstructorFunction(Constructor constructor)`
  Constructs a new ConstructorFunction.

- ## Method Summary

  Modifier and Type
  Method
  Description
  `Object`
  `invoke(ExpressionContext context, Object[] parameters)`
  Converts parameters to suitable types and invokes the constructor.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### ConstructorFunction

    public ConstructorFunction(Constructor constructor)
    Constructs a new ConstructorFunction.
    Parameters:
      `constructor` - the constructor to call.

- ## Method Details

  - ### invoke

    public Object invoke(ExpressionContext context, Object[] parameters)
    Converts parameters to suitable types and invokes the constructor.
    Specified by:
      `invoke` in interface `Function`
    Parameters:
      `context` - evaluation context
      `parameters` - constructor args
    Returns:
      new instance