public class MbeansDescriptorsIntrospectionSource extends ModelerSource
| Modifier and Type | Field and Description |
|---|---|
(package private) java.lang.String |
location |
private static Log |
log |
(package private) java.util.List |
mbeans |
private static javax.management.ObjectName[] |
objNameArray |
(package private) Registry |
registry |
(package private) java.lang.Object |
source |
(package private) static java.util.Hashtable |
specialMethods |
private static java.lang.String[] |
strArray |
private static java.lang.Class[] |
supportedTypes |
(package private) java.lang.String |
type |
| Constructor and Description |
|---|
MbeansDescriptorsIntrospectionSource() |
| Modifier and Type | Method and Description |
|---|---|
ManagedBean |
createManagedBean(Registry registry,
java.lang.String domain,
java.lang.Class realClass,
java.lang.String type)
XXX Find if the 'className' is the name of the MBean or
the real class ( I suppose first )
XXX Read (optional) descriptions from a .properties, generated
from source
XXX Deal with constructors
|
void |
execute() |
private void |
initMethods(java.lang.Class realClass,
java.lang.reflect.Method[] methods,
java.util.Hashtable attMap,
java.util.Hashtable getAttMap,
java.util.Hashtable setAttMap,
java.util.Hashtable invokeAttMap)
Process the methods and extract 'attributes', methods, etc
|
protected boolean |
isBeanCompatible(java.lang.Class javaType)
Check if this class conforms to JavaBeans specifications.
|
java.util.List |
loadDescriptors(Registry registry,
java.lang.String location,
java.lang.String type,
java.lang.Object source)
Load data, returns a list of items.
|
void |
setLocation(java.lang.String loc) |
void |
setRegistry(Registry reg) |
void |
setSource(java.lang.Object source) |
void |
setType(java.lang.String type)
Used if a single component is loaded
|
private boolean |
supportedType(java.lang.Class ret)
Check if this class is one of the supported types.
|
private static java.lang.String |
unCapitalize(java.lang.String name)
Converts the first character of the given
String into lower-case.
|
getInputStream, store, updateFieldprivate static Log log
Registry registry
java.lang.String location
java.lang.String type
java.lang.Object source
java.util.List mbeans
static java.util.Hashtable specialMethods
private static java.lang.String[] strArray
private static javax.management.ObjectName[] objNameArray
private static java.lang.Class[] supportedTypes
public MbeansDescriptorsIntrospectionSource()
public void setRegistry(Registry reg)
public void setLocation(java.lang.String loc)
public void setType(java.lang.String type)
type - public void setSource(java.lang.Object source)
public java.util.List loadDescriptors(Registry registry, java.lang.String location, java.lang.String type, java.lang.Object source) throws java.lang.Exception
ModelerSourceloadDescriptors in class ModelerSourcesource - Introspected object or some other sourcejava.lang.Exceptionpublic void execute()
throws java.lang.Exception
java.lang.Exceptionprivate boolean supportedType(java.lang.Class ret)
ret - The class to checkprotected boolean isBeanCompatible(java.lang.Class javaType)
javaType - The class to checkprivate void initMethods(java.lang.Class realClass,
java.lang.reflect.Method[] methods,
java.util.Hashtable attMap,
java.util.Hashtable getAttMap,
java.util.Hashtable setAttMap,
java.util.Hashtable invokeAttMap)
realClass - The class to processmethods - The methods to processattMap - The attribute map (complete)getAttMap - The readable attributess mapsetAttMap - The settable attributes mapinvokeAttMap - The invokable attributes mappublic ManagedBean createManagedBean(Registry registry, java.lang.String domain, java.lang.Class realClass, java.lang.String type)
registry - The Bean registry (not used)domain - The bean domain (not used)realClass - The class to analyzetype - The bean typeprivate static java.lang.String unCapitalize(java.lang.String name)
name - The string to convertCopyright (c) 2001-2003 - Apache Software Foundation