FileDocCategorySizeDatePackage
AMXAttributeNameMapper.javaAPI DocGlassfish v2 API5028Fri May 04 22:23:40 BST 2007com.sun.enterprise.management.support

AMXAttributeNameMapper

public interface AMXAttributeNameMapper
Maps names to a derived name. An example use for this might be to map a JMX Attribute "foo-bar" to a suiteable "FooBar" form so that it can be used as a Java identifier.

Fields Summary
Constructors Summary
Methods Summary
public java.lang.StringderivedToOriginal(java.lang.String derivedName)
Reverse the effect of originalToDerived()

param
derivedName name derived from the original one

public java.util.SetgetDerivedNames()
Get all derived names which have a mapping.

public java.util.SetgetUnmappedOriginals()

public java.lang.StringmatchName(java.lang.String derivedName, java.lang.String[] candidates)
Attempt to match the derived name to one of the candidates. This facility is used when different runtime conditions present different original names which must be mapped to the same derived name.

If a name is matched it is added as a mapping and the original name is returned.

public java.lang.StringmatchName(java.lang.String derivedName, java.lang.String candidates)

public java.lang.StringmatchName(java.lang.String derivedName, java.lang.String candidates1, java.lang.String candidate2)

public voidmatchNames(java.lang.String[] derivedCandidates, java.lang.String[] originalCandidates)
Call {@link #getUnmappedOriginals} to get the original names which are not used in a mapping.

public java.lang.StringoriginalToDerived(java.lang.String originalName)
Maps Attribute names to another name.

A common use is to construct legal Java identifiers, so that they can be exposed in an MBean proxy with get/set routines.

For example "classpath-prefix" is not legal in a Java API; it could not generate the methods getclasspath-prefix() and setclasspath-prefix().

Any legal mapping is OK. Suggested possible mappings include: ClasspathPrefix, classpathPrefix, classpath_prefix, etc. These would result in the method names: getClasspathPrefix(), getclasspathPrefix(), getclasspath_prefix(), etc.

param
originalName original name