com.sun.appserv.management.util.jmx
Class MBeanGenerator
java.lang.Object
com.sun.appserv.management.util.jmx.MBeanGenerator
- All Implemented Interfaces:
- MBeanGeneratorHook
public class MBeanGenerator
- extends Object
- implements MBeanGeneratorHook
Generate an MBean ".java" file.
Method Summary |
static void |
countTypes(Map<String,Integer> counts,
MBeanAttributeInfo[] infos)
Count how many times an Attribute type is used. |
protected String |
formMethod(String returnType,
String name,
String[] params,
String[] names)
|
String |
generate(MBeanInfo info,
boolean emitComments)
|
protected String |
generateAttributes(MBeanAttributeInfo[] infos)
|
protected String |
generateOperations(MBeanOperationInfo[] infos)
|
protected String |
getAttributeNameComment(String attributeName,
String javaName)
Return a comment regarding the Attribute name if it was mapped to a different
Java name. |
String |
getClassname(MBeanInfo info)
|
String |
getExceptions(MBeanOperationInfo info)
|
String |
getGetterComment(MBeanAttributeInfo info,
String actualName)
|
String |
getGetterSetterComment(MBeanAttributeInfo info,
String actualName)
|
String |
getHeaderComment(MBeanInfo info)
|
String |
getInterfaceComment(MBeanInfo info)
|
String |
getOperationComment(MBeanOperationInfo info,
String[] paramNames)
|
String |
getPackageName(MBeanInfo info)
|
String[] |
getParamNames(MBeanOperationInfo info)
|
String |
getSetterComment(MBeanAttributeInfo info,
String actualName)
|
protected String |
indent(String contents)
|
protected String |
indent(String contents,
String prefix)
|
protected boolean |
isBoilerplateDescription(String description)
|
protected boolean |
isUnqualifiedType(String type)
|
protected String |
makeJavadocComment(String contents)
|
protected boolean |
typeMayBeAbbreviated(String type)
type must be the "friendly" name. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
FINAL_PREFIX
public static final String FINAL_PREFIX
- See Also:
- Constant Field Values
IMPORT_THRESHOLD
public static final int IMPORT_THRESHOLD
- See Also:
- Constant Field Values
MBeanGenerator
public MBeanGenerator()
countTypes
public static void countTypes(Map<String,Integer> counts,
MBeanAttributeInfo[] infos)
- Count how many times an Attribute type is used.
isUnqualifiedType
protected boolean isUnqualifiedType(String type)
typeMayBeAbbreviated
protected boolean typeMayBeAbbreviated(String type)
- type must be the "friendly" name.
generate
public String generate(MBeanInfo info,
boolean emitComments)
indent
protected String indent(String contents,
String prefix)
indent
protected String indent(String contents)
makeJavadocComment
protected String makeJavadocComment(String contents)
formMethod
protected String formMethod(String returnType,
String name,
String[] params,
String[] names)
getAttributeNameComment
protected String getAttributeNameComment(String attributeName,
String javaName)
- Return a comment regarding the Attribute name if it was mapped to a different
Java name.
generateAttributes
protected String generateAttributes(MBeanAttributeInfo[] infos)
generateOperations
protected String generateOperations(MBeanOperationInfo[] infos)
isBoilerplateDescription
protected boolean isBoilerplateDescription(String description)
getParamNames
public String[] getParamNames(MBeanOperationInfo info)
- Specified by:
getParamNames
in interface MBeanGeneratorHook
getGetterSetterComment
public String getGetterSetterComment(MBeanAttributeInfo info,
String actualName)
getGetterComment
public String getGetterComment(MBeanAttributeInfo info,
String actualName)
- Specified by:
getGetterComment
in interface MBeanGeneratorHook
getSetterComment
public String getSetterComment(MBeanAttributeInfo info,
String actualName)
- Specified by:
getSetterComment
in interface MBeanGeneratorHook
getOperationComment
public String getOperationComment(MBeanOperationInfo info,
String[] paramNames)
- Specified by:
getOperationComment
in interface MBeanGeneratorHook
getHeaderComment
public String getHeaderComment(MBeanInfo info)
- Specified by:
getHeaderComment
in interface MBeanGeneratorHook
getInterfaceComment
public String getInterfaceComment(MBeanInfo info)
- Specified by:
getInterfaceComment
in interface MBeanGeneratorHook
getPackageName
public String getPackageName(MBeanInfo info)
- Specified by:
getPackageName
in interface MBeanGeneratorHook
getClassname
public String getClassname(MBeanInfo info)
- Specified by:
getClassname
in interface MBeanGeneratorHook
getExceptions
public String getExceptions(MBeanOperationInfo info)
- Specified by:
getExceptions
in interface MBeanGeneratorHook
Submit a bug or feature Copyright 2006 Sun Microsystems, Inc. All rights reserved.