Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  * Copyright 2004-2008 the original author or authors.
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
  * You may obtain a copy of the License at
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * See the License for the specific language governing permissions and
 * limitations under the License.
package org.springframework.binding.method;
A specification for a method consisting of the methodName and an optional set of named arguments. This class provides the ability to resolve a method with parameters and evaluate its argument values as part of a method invoker attempt.

Keith Donald
Jeremy Grelle
public class MethodSignature {

The name of the method, e.g "execute".
	private String methodName;

The parameter types of the method, e.g "int param1".
Creates a method signature with no parameters.

methodName the name of the method
	public MethodSignature(String methodName) {

Creates a method signature with a single parameter.

methodName the name of the method
parameter the method parameter
	public MethodSignature(String methodNameParameter parameter) {
		this(methodNamenew Parameters(parameter));

Creates a method signature with a list of parameters.

methodName the name of the method
parameters the method parameters
	public MethodSignature(String methodNameParameters parameters) {
		Assert.notNull(methodName"The method name is required");
		Assert.notNull(parameters"The parameters are required");
		this. = methodName;
		this. = parameters;

Returns the method name.
	public String getMethodName() {
		return ;

Returns the method parameters.
		return ;
	public boolean equals(Object obj) {
		if (!(obj instanceof MethodSignature)) {
			return false;
		return .equals(other.methodName) && .equals(other.parameters);
	public int hashCode() {
	public String toString() {
		return new ToStringCreator(this).append("methodName").append("parameters").toString();
New to GrepCode? Check out our FAQ X