AliasedSymbol
ConstantDefinition
, FunctionSymbol
public static class AliasedSymbol.AliasedSymbolImpl extends Object implements AliasedSymbol
AliasedSymbol.AliasedSymbolImpl, AliasedSymbol.NoneAliasedSymbol
Constructor | Description |
---|---|
AliasedSymbolImpl(AliasedSymbol.AliasedSymbolImpl o) |
|
AliasedSymbolImpl(String origName) |
Modifier and Type | Method | Description |
---|---|---|
void |
addAliasedName(String origName) |
|
Set<String> |
getAliasedNames() |
Return all aliases for this symbol, i.e.
|
String |
getAliasedString() |
|
String |
getName() |
Return the current-name, which is the last
renamed-name if issued,
or the original-name . |
String |
getOrigName() |
Return the original-name as set at creation.
|
boolean |
hasAliases() |
Returns
true if this symbol has aliases, i.e. |
void |
rename(String newName) |
Rename this symbol with the given
newName if not equal current-name . |
public AliasedSymbolImpl(String origName)
public AliasedSymbolImpl(AliasedSymbol.AliasedSymbolImpl o)
public void rename(String newName)
AliasedSymbol
newName
if not equal current-name
.
Before renaming the current-name
will be added
to the list of aliases
.
while the given newName
will be removed.
Operation will be ignored if newName
is null
.
rename
in interface AliasedSymbol
newName
- the new current-name
, maybe null
public void addAliasedName(String origName)
AliasedSymbol
origName
to the list of aliases
if not equal current-name
.
Operation will be ignored if newName
is null
.
addAliasedName
in interface AliasedSymbol
origName
- the new alias to be added, maybe null
public boolean hasAliases()
AliasedSymbol
true
if this symbol has aliases, i.e. either being renamed
or aliases-added
.
Otherwise false
is being returned.
hasAliases
in interface AliasedSymbol
public Set<String> getAliasedNames()
AliasedSymbol
Inclusive original-name
, if renamed
,
Exclusive current-name
.
May return null
or a zero sized Set
for no aliases.
getAliasedNames
in interface AliasedSymbol
public String getOrigName()
AliasedSymbol
getOrigName
in interface AliasedSymbol
public String getName()
AliasedSymbol
renamed-name
if issued,
or the original-name
.getName
in interface AliasedSymbol
public String getAliasedString()
AliasedSymbol
getAliasedString
in interface AliasedSymbol