Game Control Plus  1.2.2
 All Classes Namespaces Functions Variables Pages
org.gamecontrolplus.Plug Class Reference

Public Member Functions

 Plug (final Object i_object, final String i_methodName)
 
 Plug (final Object i_object, final String i_methodName, final boolean i_hasParameter)
 

Package Functions

boolean hasParamter ()
 
void call (final float i_x, final float i_y)
 
void call ()
 

Private Member Functions

boolean checkParameter (final Class<?>[] objectMethodParams) throws Exception
 
Method initPlug ()
 

Private Attributes

final Method method
 
final String methodName
 
final Object object
 
final Class<?> objectClass
 
boolean hasParameter = false
 

Detailed Description

A Plug is the invocation of a method to handle incoming Events. These methods are plugged by reflection, so a plug needs the name of this method and the object where it is declared.

Author
Christian Riekoff

Constructor & Destructor Documentation

org.gamecontrolplus.Plug.Plug ( final Object  i_object,
final String  i_methodName 
)

Initializes a new Plug by a method name and the object declaring the method.

Parameters
i_object
i_methodName
org.gamecontrolplus.Plug.Plug ( final Object  i_object,
final String  i_methodName,
final boolean  i_hasParameter 
)

Initializes a new Plug by a method name and the object declaring the method.

Parameters
i_object
i_methodName

Member Function Documentation

void org.gamecontrolplus.Plug.call ( final float  i_x,
final float  i_y 
)
package

Calls the plug by invoking the method given by the plug.

Parameters
i_value
boolean org.gamecontrolplus.Plug.checkParameter ( final Class<?>[]  objectMethodParams) throws Exception
private
Exceptions
Exception
Method org.gamecontrolplus.Plug.initPlug ( )
private

Intitializes the method that has been plugged.

Returns

Member Data Documentation

boolean org.gamecontrolplus.Plug.hasParameter = false
private

Kind of Parameter that is handled by the plug can be NOTE, Controller, Program Change or a MidiEvent at general

final Method org.gamecontrolplus.Plug.method
private

The plugged method

final String org.gamecontrolplus.Plug.methodName
private

Name of the method to plug

final Object org.gamecontrolplus.Plug.object
private

Object containing the method to plug

final Class<?> org.gamecontrolplus.Plug.objectClass
private

Class of the object containing the method to plug