Package com.sun.xml.bind.api.impl
Interface NameConverter
- All Known Implementing Classes:
NameConverter.Standard
public interface NameConverter
Converts aribitrary strings into Java identifiers.
- Author:
- Kohsuke KAWAGUCHI
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final NameConverter
JAX-PRC compatible name converter implementation.static final NameConverter
Smarter converter used for RELAX NG support.static final NameConverter
The name converter implemented by Code Model. -
Method Summary
Modifier and TypeMethodDescriptiontoClassName
(String token) converts a string into an identifier suitable for classes.toConstantName
(String token) converts a string into an identifier suitable for constants.toInterfaceName
(String token) converts a string into an identifier suitable for interfaces.toPackageName
(String namespaceUri) Converts a namespace URI into a package name.toPropertyName
(String token) converts a string into an identifier suitable for properties.toVariableName
(String token) Converts a string into an identifier suitable for variables.
-
Field Details
-
standard
The name converter implemented by Code Model. This is the standard name conversion for JAXB. -
jaxrpcCompatible
JAX-PRC compatible name converter implementation. The only difference is that we treat '_' as a valid character and not as a word separator. -
smart
Smarter converter used for RELAX NG support.
-
-
Method Details
-
toClassName
converts a string into an identifier suitable for classes. In general, this operation should generate "NamesLikeThis". -
toInterfaceName
converts a string into an identifier suitable for interfaces. In general, this operation should generate "NamesLikeThis". But for example, it can prepend every interface with 'I'. -
toPropertyName
converts a string into an identifier suitable for properties. In general, this operation should generate "NamesLikeThis", which will be used with known prefixes like "get" or "set". -
toConstantName
converts a string into an identifier suitable for constants. In the standard Java naming convention, this operation should generate "NAMES_LIKE_THIS". -
toVariableName
Converts a string into an identifier suitable for variables. In general it should generate "namesLikeThis". -
toPackageName
Converts a namespace URI into a package name. This method should expect strings like "http://foo.bar.zot/org", "urn:abc:def:ghi" "", or even "###" (basically anything) and expected to return a package name, liks "org.acme.foo".
-