APIdia Launch Partner
Top Description Inners Fields Constructors Methods
com.sun.jmx.mbeanserver

pack-priv Class MBeanAnalyzer<M>

extends Object
Class Inheritance
Type Parameters
<M>
Method or ConvertingMethod according as this is a Standard MBean or an MXBean.
Static Imports
com.sun.jmx.mbeanserver.Util.*

An analyzer for a given MBean interface. The analyzer can be for Standard MBeans or MXBeans, depending on the MBeanIntrospector passed at construction.

The analyzer can visit the attributes and operations of the interface, calling a caller-supplied visitor method for each one.

Since
1.6

Nested and Inner Type Summary

Modifier and TypeClass and Description
private static class
pack-priv static interface
private static class
MBeanAnalyzer.MethodOrder

A comparator that defines a total order so that methods have the same name and identical signatures appear next to each others.

Field Summary

Modifier and TypeField and Description
private Map<String, MBeanAnalyzer.AttrMethods<M>>
private Map<String, List<M>>

Constructor Summary

AccessConstructor and Description
private
MBeanAnalyzer(Class<?> mbeanType, MBeanIntrospector<M> introspector)

Method Summary

Modifier and TypeMethod and Description
pack-priv static <M> MBeanAnalyzer<M>
analyzer(Class<?> mbeanType, MBeanIntrospector<M> introspector)

Return an MBeanAnalyzer for the given MBean interface and MBeanIntrospector.

pack-priv static List<Method>
private void
initMaps(Class<?> mbeanType, MBeanIntrospector<M> introspector)

pack-priv void
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

attrMapback to summary
private Map<String, MBeanAnalyzer.AttrMethods<M>> attrMap
opMapback to summary
private Map<String, List<M>> opMap

Constructor Detail

MBeanAnalyzerback to summary
private MBeanAnalyzer(Class<?> mbeanType, MBeanIntrospector<M> introspector) throws NotCompliantMBeanException

Method Detail

analyzerback to summary
pack-priv static <M> MBeanAnalyzer<M> analyzer(Class<?> mbeanType, MBeanIntrospector<M> introspector) throws NotCompliantMBeanException

Return an MBeanAnalyzer for the given MBean interface and MBeanIntrospector. Calling this method twice with the same parameters may return the same object or two different but equivalent objects.

eliminateCovariantMethodsback to summary
pack-priv static List<Method> eliminateCovariantMethods(List<Method> startMethods)
initMapsback to summary
private void initMaps(Class<?> mbeanType, MBeanIntrospector<M> introspector) throws Exception
visitback to summary
pack-priv void visit(MBeanAnalyzer.MBeanVisitor<M> visitor)
com.sun.jmx.mbeanserver back to summary

private Class MBeanAnalyzer.AttrMethods<M>

extends Object
Class Inheritance

Field Summary

Modifier and TypeField and Description
pack-priv M
pack-priv M

Constructor Summary

AccessConstructor and Description
private

Method Summary

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

getterback to summary
pack-priv M getter
setterback to summary
pack-priv M setter

Constructor Detail

AttrMethodsback to summary
private AttrMethods()
com.sun.jmx.mbeanserver back to summary

pack-priv Interface MBeanAnalyzer.MBeanVisitor<M>

Known Direct Implementers
com.sun.jmx.mbeanserver.MBeanIntrospector.MBeanInfoMaker, com.sun.jmx.mbeanserver.MXBeanProxy.Visitor, com.sun.jmx.mbeanserver.PerInterface.InitMaps

Method Summary

Modifier and TypeMethod and Description
public void
visitAttribute(String attributeName, M getter, M setter)

public void
visitOperation(String operationName, M operation)

Method Detail

visitAttributeback to summary
public void visitAttribute(String attributeName, M getter, M setter)
visitOperationback to summary
public void visitOperation(String operationName, M operation)
com.sun.jmx.mbeanserver back to summary

private Class MBeanAnalyzer.MethodOrder

extends Object
implements Comparator<Method>
Class Inheritance
All Implemented Interfaces
java.util.Comparator

A comparator that defines a total order so that methods have the same name and identical signatures appear next to each others. The methods are sorted in such a way that methods which override each other will sit next to each other, with the overridden method first - e.g. Object getFoo() is placed before Integer getFoo(). This makes it possible to determine whether a method overrides another one simply by looking at the method(s) that precedes it in the list. (see eliminateCovariantMethods).

Field Summary

Modifier and TypeField and Description
public static final MBeanAnalyzer.MethodOrder

Constructor Summary

AccessConstructor and Description
private

Method Summary

Modifier and TypeMethod and Description
public int
compare(Method a, Method b)

Implements java.util.Comparator.compare.

Compares its two arguments for order.

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

instanceback to summary
public static final MBeanAnalyzer.MethodOrder instance

Constructor Detail

MethodOrderback to summary
private MethodOrder()

Method Detail

compareback to summary
public int compare(Method a, Method b)

Implements java.util.Comparator.compare.

Doc from java.util.Comparator.compare.

Compares its two arguments for order. Returns a negative integer, zero, or a positive integer as the first argument is less than, equal to, or greater than the second.

The implementor must ensure that signum(compare(x, y)) == -signum(compare(y, x)) for all x and y. (This implies that compare(x, y) must throw an exception if and only if compare(y, x) throws an exception.)

The implementor must also ensure that the relation is transitive: ((compare(x, y)>0) && (compare(y, z)>0)) implies compare(x, z)>0.

Finally, the implementor must ensure that compare(x, y)==0 implies that signum(compare(x, z))==signum(compare(y, z)) for all z.