All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jadira.reflection.access.api.MethodAccess Maven / Gradle / Ivy

There is a newer version: 7.0.0.CR1
Show newest version
package org.jadira.reflection.access.api;

import java.lang.reflect.Method;

/**
 * Defines a mechanism for accessing a specific method within a specific class
 * @param  The class containing the method to be accessed
 */
public interface MethodAccess {	
	
	/**
	 * Get the Class containing the field being accessed
	 * @return The class
	 */
	public Class declaringClass();
	
	/**
	 * The Class giving the type of the method result or null
	 * @return The result class
	 */
	public Class returnClass();
	
	/**
	 * Get the Method being accessed
	 * @return The method
	 */
	public Method method();
	
	/**
	 * Invokes the method
	 * @param parent The instance to access the method for
	 * @param args The arguments to supply when invoking the method
	 * @return The result of the method invocation, or null for a void method
	 */
    Object invoke(C parent, Object ... args);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy