org.apache.tuscany.sca.interfacedef.java.impl
Class JavaInterfaceUtil

java.lang.Object
  extended by org.apache.tuscany.sca.interfacedef.java.impl.JavaInterfaceUtil

public final class JavaInterfaceUtil
extends java.lang.Object

Contains methods for mapping between an operation in a org.apache.tuscany.spi.model.ServiceContract and a method defined by a Java interface


Method Summary
static java.lang.reflect.Method findMethod(java.lang.Class<?> implClass, Operation operation)
          Return the method on the implementation class that matches the operation.
static Operation findOperation(java.lang.reflect.Method method, java.util.Collection<Operation> operations)
          Searches a collection of operations for a match against the given method
static java.lang.String getNamespace(java.lang.Class<?> cls)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

findMethod

public static java.lang.reflect.Method findMethod(java.lang.Class<?> implClass,
                                                  Operation operation)
                                           throws java.lang.NoSuchMethodException
Return the method on the implementation class that matches the operation.

Parameters:
implClass - the implementation class or interface
operation - the operation to match
Returns:
the method described by the operation
Throws:
java.lang.NoSuchMethodException - if no such method exists

findOperation

public static Operation findOperation(java.lang.reflect.Method method,
                                      java.util.Collection<Operation> operations)
Searches a collection of operations for a match against the given method

Parameters:
method - the method to match
operations - the operations to match against
Returns:
a matching operation or null

getNamespace

public static java.lang.String getNamespace(java.lang.Class<?> cls)