| |
|
| java.lang.Object com.google.gwt.dev.generator.NameFactory
NameFactory | public class NameFactory (Code) | | Generates unqiue identifiers. Use this class to avoid generating conflicting
names with user code. This class isn't smart enough to know about scopes
(which isn't generally a problem for generators in any case).
|
Constructor Summary | |
public | NameFactory(Collection<String> existingNames) Creates a new NameFactory that knows about
existingNames . | public | NameFactory() Creates a new NameFactory that doesn't know about any
existing names. |
Method Summary | |
public void | addName(String name) Adds a name to the set of already known identifiers. | public String | createName(String name) Creates a new unique name based off of name and adds it to
the list of known names.
Parameters: name - a not null name to base the new unique name from a new unique, not null name. |
NameFactory | public NameFactory(Collection<String> existingNames)(Code) | | Creates a new NameFactory that knows about
existingNames .
Parameters: existingNames - a list of names that may be null . |
NameFactory | public NameFactory()(Code) | | Creates a new NameFactory that doesn't know about any
existing names.
|
addName | public void addName(String name)(Code) | | Adds a name to the set of already known identifiers. Has no affect if the
name is already considered an existing identifier.
Parameters: name - a not null name |
createName | public String createName(String name)(Code) | | Creates a new unique name based off of name and adds it to
the list of known names.
Parameters: name - a not null name to base the new unique name from a new unique, not null name. This name may bepossibly identical to name . |
|
|
|