Package com.jogamp.gluegen.cgram.types
Interface AliasedSymbol
-
- All Known Subinterfaces:
TypeComparator.AliasedSemanticSymbol
- All Known Implementing Classes:
AliasedSymbol.AliasedSymbolImpl
,AliasedSymbol.NoneAliasedSymbol
,CompoundType
,ConstantDefinition
,FunctionSymbol
,StructType
,UnionType
public interface AliasedSymbol
Supports symbol aliasing, i.e. renaming, while preserving all its original names, i.e. aliases.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static class
AliasedSymbol.AliasedSymbolImpl
static class
AliasedSymbol.NoneAliasedSymbol
-
Method Summary
All Methods Instance Methods Abstract Methods 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 lastrenamed-name
if issued, or theoriginal-name
.String
getOrigName()
Return the original-name as set at creation.boolean
hasAliases()
Returnstrue
if this symbol has aliases, i.e.void
rename(String newName)
Rename this symbol with the givennewName
if not equalcurrent-name
.
-
-
-
Method Detail
-
rename
void rename(String newName)
Rename this symbol with the givennewName
if not equalcurrent-name
.Before renaming the
current-name
will be added to the list ofaliases
. while the givennewName
will be removed.Operation will be ignored if
newName
isnull
.- Parameters:
newName
- the newcurrent-name
, maybenull
-
addAliasedName
void addAliasedName(String origName)
Add the givenorigName
to the list ofaliases
if not equalcurrent-name
.Operation will be ignored if
newName
isnull
.- Parameters:
origName
- the new alias to be added, maybenull
-
hasAliases
boolean hasAliases()
Returnstrue
if this symbol has aliases, i.e. either beingrenamed
oraliases-added
.Otherwise
false
is being returned.
-
getAliasedNames
Set<String> getAliasedNames()
Return all aliases for this symbol, i.e. original names, for this symbol.Inclusive
original-name
, ifrenamed
,Exclusive
current-name
.May return
null
or a zero sizedSet
for no aliases.
-
getOrigName
String getOrigName()
Return the original-name as set at creation.
-
getName
String getName()
Return the current-name, which is the lastrenamed-name
if issued, or theoriginal-name
.
-
getAliasedString
String getAliasedString()
-
-