Class NameConverter
java.lang.Object
org.openjdk.jmc.common.labelingrules.NameConverter
Converts names according to rules specified with the
labelingRules
extension point.-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
addNamingRule
(NamingRule rule) Adds a rule to the name converter.format
(JVMDescriptor descriptor) getImageResource
(JVMDescriptor descriptor) static NameConverter
getRules()
void
setIdentity
(String identity) void
setRules
(List<NamingRule> rules)
-
Field Details
-
rules
-
-
Constructor Details
-
NameConverter
public NameConverter()Create a new name converter instance. This should only be used if you want a new, clean instance. Normally thegetInstance()
method should be used instead to get a singleton instance. -
NameConverter
-
-
Method Details
-
getInstance
- Returns:
- a singleton instance
-
format
- Parameters:
descriptor
-- Returns:
- the properly formatted values. If no matching formatter could be found, the default format String as defined in NameConverter_LOCAL_NAME_TEMPLATE will be used.
-
getImageResource
-
addNamingRule
Adds a rule to the name converter.Adding rules should normally not be done using this method, but rather through the
labelingRules
extension point.- Parameters:
rule
- the rule to add.
-
getRules
- Returns:
- an immutable list of the available rules.
-
setRules
-
setIdentity
-