org.sape.carbon.core.component.factory
Class DefaultComponentFactory.MethodWrapper

java.lang.Object
  |
  +--org.sape.carbon.core.component.factory.DefaultComponentFactory.MethodWrapper
Enclosing class:
DefaultComponentFactory

protected static class DefaultComponentFactory.MethodWrapper
extends Object

This class provides a wrapper for tracking methods on the component facade, purely through their signature (name and parameters, but not declaring class). These objects can be created for each exposed method in a set of interfaces in order to determine if there are any collisions of name and parameter type between different methods being exposed on a component facade.

Since:
carbon 1.2

Field Summary
private  Method method
          Holds the method being wrapped.
 
Constructor Summary
DefaultComponentFactory.MethodWrapper(Method method)
          Constructs a new wrapper around a method.
 
Method Summary
 boolean equals(Object obj)
          Returns true if obj is a Method and the Method within this wrapper has the same name and parameters as obj.
 Method getMethod()
          Returns the Method being wrapped.
private  String getTypeString(Class type)
          Adjusts the String of the component type as needed.
 int hashCode()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

method

private Method method
Holds the method being wrapped.

Constructor Detail

DefaultComponentFactory.MethodWrapper

public DefaultComponentFactory.MethodWrapper(Method method)
Constructs a new wrapper around a method.

Parameters:
method - to wrap
Method Detail

getMethod

public Method getMethod()
Returns the Method being wrapped.

Returns:
the method being wrapped

equals

public boolean equals(Object obj)
Returns true if obj is a Method and the Method within this wrapper has the same name and parameters as obj.

Overrides:
equals in class Object
Parameters:
obj - checks the equality of the method object
Returns:
if the method is equal

hashCode

public int hashCode()
Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Overrides:
toString in class Object
See Also:
Object.toString()

getTypeString

private String getTypeString(Class type)
Adjusts the String of the component type as needed. If the component is an array, it will append a "[]" to the end of the name.

Parameters:
type - class to inspect
Returns:
a new version of the name with type information


Copyright 1999-2003 Sapient Corporation. All Rights Reserved.