<li><ahref="../../../../com/comphenix/protocol/reflect/MethodInfo.html"title="class in com.comphenix.protocol.reflect"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../../com/comphenix/protocol/reflect/ObjectWriter.html"title="class in com.comphenix.protocol.reflect"><spanclass="strong">Next Class</span></a></li>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>object</code> - invoke method on this object</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>arg</code> - use this argument</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>object</code> - invoke method on this object</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>args</code> - use these arguments - treat null as empty array</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
<divclass="block"><p>Invoke a named method whose parameter type matches the object type.</p>
<p>The behaviour of this method is less deterministic
than <ahref="../../../../com/comphenix/protocol/reflect/MethodUtils.html#invokeExactMethod(java.lang.Object, java.lang.String, java.lang.Object[], java.lang.Class[])"><code>invokeExactMethod(Object object,String methodName,Object [] args,Class[] parameterTypes)</code></a>.
It loops through all methods with names that match
and then executes the first it finds with compatable parameters.</p>
<p>This method supports calls to methods taking primitive parameters
via passing in wrapping classes. So, for example, a <code>Boolean</code> class
would match a <code>boolean</code> primitive.</p></div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>object</code> - invoke method on this object</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>args</code> - use these arguments - treat null as empty array</dd><dd><code>parameterTypes</code> - match these parameters - treat null as empty array</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>object</code> - invoke method on this object</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>arg</code> - use this argument</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
<divclass="block"><p>Invoke a method whose parameter types match exactly the object
types.</p>
<p> This uses reflection to invoke the method obtained from a call to
<code>getAccessibleMethod()</code>.</p></div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>object</code> - invoke method on this object</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>args</code> - use these arguments - treat null as empty array</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
<divclass="block"><p>Invoke a method whose parameter types match exactly the parameter
types given.</p>
<p>This uses reflection to invoke the method obtained from a call to
<code>getAccessibleMethod()</code>.</p></div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>object</code> - invoke method on this object</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>args</code> - use these arguments - treat null as empty array</dd><dd><code>parameterTypes</code> - match these parameters - treat null as empty array</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>objectClass</code> - invoke static method on this class</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>args</code> - use these arguments - treat null as empty array</dd><dd><code>parameterTypes</code> - match these parameters - treat null as empty array</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
via reflection</dd><dt><spanclass="strong">Since:</span></dt>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>objectClass</code> - invoke static method on this class</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>arg</code> - use this argument</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
via reflection</dd><dt><spanclass="strong">Since:</span></dt>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>objectClass</code> - invoke static method on this class</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>args</code> - use these arguments - treat null as empty array</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
via reflection</dd><dt><spanclass="strong">Since:</span></dt>
<divclass="block"><p>Invoke a named static method whose parameter type matches the object type.</p>
<p>The behaviour of this method is less deterministic
than <ahref="../../../../com/comphenix/protocol/reflect/MethodUtils.html#invokeExactStaticMethod(java.lang.Class, java.lang.String, java.lang.Object[], java.lang.Class[])"><code>invokeExactStaticMethod(Class objectClass,String methodName,Object [] args,Class[] parameterTypes)</code></a>.
It loops through all methods with names that match
and then executes the first it finds with compatable parameters.</p>
<p>This method supports calls to methods taking primitive parameters
via passing in wrapping classes. So, for example, a <code>Boolean</code> class
would match a <code>boolean</code> primitive.</p></div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>objectClass</code> - invoke static method on this class</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>args</code> - use these arguments - treat null as empty array</dd><dd><code>parameterTypes</code> - match these parameters - treat null as empty array</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
via reflection</dd><dt><spanclass="strong">Since:</span></dt>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>objectClass</code> - invoke static method on this class</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>arg</code> - use this argument</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
via reflection</dd><dt><spanclass="strong">Since:</span></dt>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>objectClass</code> - invoke static method on this class</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>args</code> - use these arguments - treat null as empty array</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>The value returned by the invoked method</dd>
<dt><spanclass="strong">Throws:</span></dt>
<dd><code>java.lang.NoSuchMethodException</code> - if there is no such accessible method</dd>
<dd><code>java.lang.reflect.InvocationTargetException</code> - wraps an exception thrown by the
method invoked</dd>
<dd><code>java.lang.IllegalAccessException</code> - if the requested method is not accessible
via reflection</dd><dt><spanclass="strong">Since:</span></dt>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>clazz</code> - get method from this class</dd><dd><code>methodName</code> - get method with this name</dd><dd><code>parameterTypes</code> - with these parameters types</dd>
<divclass="block"><p>Return an accessible method (that is, one that can be invoked via
reflection) that implements the specified Method. If no such method
can be found, return <code>null</code>.</p></div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>clazz</code> - The class of the object</dd><dd><code>method</code> - The method that we wish to call</dd>
<p>This method can match primitive parameter by passing in wrapper classes.
For example, a <code>Boolean</code> will match a primitive <code>boolean</code>
parameter.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>clazz</code> - find method in this class</dd><dd><code>methodName</code> - find method with this name</dd><dd><code>parameterTypes</code> - find method with compatible parameters</dd>
<divclass="block"><p>Determine whether a type can be used as a parameter in a method invocation.
This method handles primitive conversions correctly.</p>
<p>In order words, it will match a <code>Boolean</code> to a <code>boolean</code>,
a <code>Long</code> to a <code>long</code>,
a <code>Float</code> to a <code>float</code>,
a <code>Integer</code> to a <code>int</code>,
and a <code>Double</code> to a <code>double</code>.
Now logic widening matches are allowed.
For example, a <code>Long</code> will not match a <code>int</code>.</div>
<dl><dt><spanclass="strong">Parameters:</span></dt><dd><code>parameterType</code> - the type of parameter accepted by the method</dd><dd><code>parameterization</code> - the type of parameter being tested</dd>
<dt><spanclass="strong">Returns:</span></dt><dd>true if the assignement is compatible.</dd></dl>
<li><ahref="../../../../com/comphenix/protocol/reflect/MethodInfo.html"title="class in com.comphenix.protocol.reflect"><spanclass="strong">Prev Class</span></a></li>
<li><ahref="../../../../com/comphenix/protocol/reflect/ObjectWriter.html"title="class in com.comphenix.protocol.reflect"><spanclass="strong">Next Class</span></a></li>