Top Description Fields Constructors Methods
com.sun.tools.xjc.model

pack-priv final Class ClassNameAllocatorWrapper

extends Object
implements ClassNameAllocator
Class Inheritance
All Implemented Interfaces
com.sun.tools.xjc.api.ClassNameAllocator
Imports
com.sun.codemodel.JPackage, com.sun.tools.xjc.api.ClassNameAllocator

Wraps ClassNameAllocator and provides convenience.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final ClassNameAllocator

Constructor Summary

AccessConstructor and Description
pack-priv

Method Summary

Modifier and TypeMethod and Description
public String
assignClassName(String packageName, String className)

Implements com.sun.tools.xjc.api.ClassNameAllocator.assignClassName.

Hook that allows the client of the XJC API to rename some of the JAXB-generated classes.

public String
public String
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

coreback to summary
private final ClassNameAllocator core

Constructor Detail

ClassNameAllocatorWrapperback to summary
pack-priv ClassNameAllocatorWrapper(ClassNameAllocator core)

Method Detail

assignClassNameback to summary
public String assignClassName(String packageName, String className)

Implements com.sun.tools.xjc.api.ClassNameAllocator.assignClassName.

Doc from com.sun.tools.xjc.api.ClassNameAllocator.assignClassName.

Hook that allows the client of the XJC API to rename some of the JAXB-generated classes.

When registered, this calllbcak is consulted for every package-level classes/interfaces/enums (hereafter, simply "classes") that the JAXB RI generates. Note that the JAXB RI does not use this allocator for nested/inner classes.

If the allocator chooses to rename some classes. It is the allocator's responsibility to find unique names. If the returned name collides with other classes, the JAXB RI will report errors.

Annotations
@Override
assignClassNameback to summary
public String assignClassName(JPackage pkg, String className)
assignClassNameback to summary
public String assignClassName(CClassInfoParent parent, String className)