public class MethodHandler extends Object implements RevisionHandler
Constructor and Description |
---|
MethodHandler()
initializes the handler
|
Modifier and Type | Method and Description |
---|---|
void |
add(Class c,
Method method)
adds the specified method for the given class to its internal list.
|
void |
add(String displayName,
Method method)
adds the specified method for the property with the given displayname
to its internal list.
|
void |
clear()
removes all mappings
|
boolean |
contains(Class c)
checks whether a method is stored for the given class
|
boolean |
contains(String displayName)
checks whether a method is stored for the given property
|
Method |
get(Class c)
returns the stored method for the given class
|
Method |
get(String displayName)
returns the stored method for the given property
|
String |
getRevision()
Returns the revision string.
|
Enumeration |
keys()
returns an enumeration over all currently stored custom methods, i.e.
|
boolean |
remove(Class c)
removes the method for the specified class from its internal list.
|
boolean |
remove(String displayName)
removes the method for the property specified by the display name
from its internal list.
|
int |
size()
returns the number of currently stored Methods
|
String |
toString()
returns the internal Hashtable (propety/class - method relationship) in
a string representation
|
public Enumeration keys()
m_Methods
public void add(String displayName, Method method)
displayName
- the display name of the property to handle manuallymethod
- the method, which will be invoked by reflection to handle
the property manuallym_Methods
public void add(Class c, Method method)
c
- the class to handle manuallymethod
- the method, which will be invoked by reflection to handle
the property manuallym_Methods
public boolean remove(String displayName)
displayName
- the display name of the propery to remove the custom
method form_Methods
public boolean remove(Class c)
c
- the class to remove the custom method form_Methods
public boolean contains(String displayName)
displayName
- the display name of the property to check for a methodm_Methods
public boolean contains(Class c)
c
- the class to check for a methodm_Methods
public Method get(String displayName)
displayName
- the display name of the property to retrieve the
method fornull
m_Methods
public Method get(Class c)
c
- the class to retrieve the method fornull
m_Methods
public int size()
public void clear()
public String toString()
public String getRevision()
getRevision
in interface RevisionHandler
Copyright © 2013 University of Waikato, Hamilton, NZ. All Rights Reserved.