org.apache.tapestry5.internal.util
Class MethodInvocationBuilder

java.lang.Object
  extended by org.apache.tapestry5.internal.util.MethodInvocationBuilder

public final class MethodInvocationBuilder
extends Object

A utility class for building part of a method body to invoke a method. Analyzes the method and matches parameter types to ParameterBuilders.


Constructor Summary
MethodInvocationBuilder()
           
 
Method Summary
 void addParameter(String parameterType, ParameterBuilder builder)
          Maps a parameter type to a ParameterBuilder.
 void addParameter(String parameterType, String expression)
          Maps a parameter type to a literal string to be used for the parameter expression.
 String buildMethodInvocation(TransformMethodSignature signature, ClassTransformation transformation)
          Builds the method invocation.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MethodInvocationBuilder

public MethodInvocationBuilder()
Method Detail

addParameter

public void addParameter(String parameterType,
                         ParameterBuilder builder)
Maps a parameter type to a ParameterBuilder.


addParameter

public void addParameter(String parameterType,
                         String expression)
Maps a parameter type to a literal string to be used for the parameter expression.

See Also:
StringParameterBuilder

buildMethodInvocation

public String buildMethodInvocation(TransformMethodSignature signature,
                                    ClassTransformation transformation)
Builds the method invocation. Analyzes the type of each parameter to the method, and uses a ParameterBuilder to provide the expression. Supplies a default value (usually null) for any parameters that do not have parameter builders.

Parameters:
signature - of the method to invoke
transformation -
Returns:
method invocation expression
See Also:
TransformUtils.getDefaultValue(String)


Copyright © 2003-2012 The Apache Software Foundation.