ClassName and a
feature name.
This class is stateful, so the same instance should be used for all name generation.
| Modifier and Type | Field and Description |
|---|---|
| private static final String | |
| private final ClassName | |
| private final String | |
| private static final String | |
| private final Map |
| Access | Constructor and Description |
|---|---|
| public | ClassNameGenerator(ClassName
the default target class to use defaultTarget)Create a new instance using the specified |
| public | ClassNameGenerator(ClassName
the default target class to use defaultTarget, String the prefix to use to qualify feature names featureNamePrefix)Create a new instance using the specified |
| private | ClassNameGenerator(ClassName defaultTarget, String featureNamePrefix, Map<String, AtomicInteger> sequenceGenerator)
|
| Modifier and Type | Method and Description |
|---|---|
| private String | |
| public ClassName | Returns: a unique generated class namethe name of the feature that the generated class
supports featureName, ClassName the class the newly generated class relates to, or
target)null to use the main targetGenerate a unique |
| private ClassName | |
| pack-priv String | |
| private String | |
| private static String | |
| pack-priv ClassNameGenerator | Returns: a new instance for the specified feature name prefixthe feature name prefix to use featureNamePrefix)Create a new |
| AOT_FEATURE | back to summary |
|---|---|
| private static final String AOT_FEATURE | |
| defaultTarget | back to summary |
|---|---|
| private final ClassName defaultTarget | |
| featureNamePrefix | back to summary |
|---|---|
| private final String featureNamePrefix | |
| SEPARATOR | back to summary |
|---|---|
| private static final String SEPARATOR | |
| sequenceGenerator | back to summary |
|---|---|
| private final Map<String, AtomicInteger> sequenceGenerator | |
| ClassNameGenerator | back to summary |
|---|---|
| public ClassNameGenerator(ClassName defaultTarget) Create a new instance using the specified
| |
| ClassNameGenerator | back to summary |
|---|---|
| public ClassNameGenerator(ClassName defaultTarget, String featureNamePrefix) Create a new instance using the specified | |
| ClassNameGenerator | back to summary |
|---|---|
| private ClassNameGenerator(ClassName defaultTarget, String featureNamePrefix, Map<String, AtomicInteger> sequenceGenerator) | |
| clean | back to summary |
|---|---|
| private String clean(String name) | |
| generateClassName | back to summary |
|---|---|
| public ClassName generateClassName(String featureName, ClassName target) Generate a unique The class name is a suffixed version of the target. For instance, a
Generated class names are unique. If such a feature was already requested for this target, a counter is used to ensure uniqueness. | |
| generateSequencedClassName | back to summary |
|---|---|
| private ClassName generateSequencedClassName(String name) | |
| getFeatureNamePrefix | back to summary |
|---|---|
| pack-priv String getFeatureNamePrefix() | |
| getRootName | back to summary |
|---|---|
| private String getRootName(String featureName, ClassName target) | |
| toName | back to summary |
|---|---|
| private static String toName(ClassName className) | |
| withFeatureNamePrefix | back to summary |
|---|---|
| pack-priv ClassNameGenerator withFeatureNamePrefix(String featureNamePrefix) Create a new
| |