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

public Class AutoClassNameAllocator

extends Object
implements ClassNameAllocator
Class Inheritance
All Implemented Interfaces
com.sun.tools.xjc.api.ClassNameAllocator
Imports
java.util.Set, .Map, .HashMap, .HashSet, com.sun.tools.xjc.api.ClassNameAllocator

ClassNameAllocator filter that performs automatic name conflict resolution.
Author
Kohsuke Kawaguchi

Field Summary

Modifier and TypeField and Description
private final ClassNameAllocator
private final Map<String, Set<String>>

Constructor Summary

AccessConstructor and Description
public

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.

private String
determineName(String packageName, String className)

Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

coreback to summary
private final ClassNameAllocator core
namesback to summary
private final Map<String, Set<String>> names

Constructor Detail

AutoClassNameAllocatorback to summary
public AutoClassNameAllocator(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
determineNameback to summary
private String determineName(String packageName, String className)