Class Parameter

java.lang.Object
org.springframework.binding.method.Parameter

public class Parameter extends Object
A named method parameter. Each parameter has an identifying name and is of a specified type (class).
Author:
Keith Donald
  • Constructor Details

    • Parameter

      public Parameter(Class<?> type, Expression name)
      Create a new named parameter definition. Named parameters are capable of resolving parameter values (arguments) from argument sources.
      Parameters:
      type - the parameter type, may be null
      name - the name the method argument expression (required)
  • Method Details

    • getType

      public Class<?> getType()
      Returns the parameter type. Could be null if no parameter type was specified.
    • getName

      public Expression getName()
      Returns the parameter name.
    • evaluateArgument

      public Object evaluateArgument(Object argumentSource)
      Evaluate this method parameter against the provided argument source, returning a single method argument value.
      Parameters:
      argumentSource - the method argument source
      Returns:
      the method argument value
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object