Package org.apache.juneau.jsonschema
Class BasicBeanDefMapper
java.lang.Object
org.apache.juneau.jsonschema.BasicBeanDefMapper
- All Implemented Interfaces:
BeanDefMapper
Simple implementation of the
BeanDefMapper
interface.
IDs are created by calling Class.getSimpleName()
.
URIs are constructed using the pattern
See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.apache.juneau.jsonschema.BeanDefMapper
BeanDefMapper.Void
-
Constructor Summary
ModifierConstructorDescriptionDefault constructor.protected
BasicBeanDefMapper
(String uriPattern) Constructor that allows you to override the URI pattern. -
Method Summary
-
Constructor Details
-
BasicBeanDefMapper
public BasicBeanDefMapper()Default constructor. -
BasicBeanDefMapper
Constructor that allows you to override the URI pattern.- Parameters:
uriPattern
- The URI pattern usingMessageFormat
-style arguments.
-
-
Method Details
-
getId
Description copied from interface:BeanDefMapper
Returns the ID for the specified class.- Specified by:
getId
in interfaceBeanDefMapper
- Parameters:
cm
- The class.- Returns:
- The ID for the specified class.
-
getURI
Description copied from interface:BeanDefMapper
Returns the URI for the specified class.- Specified by:
getURI
in interfaceBeanDefMapper
- Parameters:
cm
- The class.- Returns:
- The URI for the specified class.
-
getURI
Description copied from interface:BeanDefMapper
Returns the URI for the specified class by its ID.- Specified by:
getURI
in interfaceBeanDefMapper
- Parameters:
id
- The class ID.- Returns:
- The URI for the specified class.
-