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 AliasedSymbolSupports 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 classAliasedSymbol.AliasedSymbolImplstatic classAliasedSymbol.NoneAliasedSymbol
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAliasedName(String origName)Set<String>getAliasedNames()Return all aliases for this symbol, i.e.StringgetAliasedString()StringgetName()Return the current-name, which is the lastrenamed-nameif issued, or theoriginal-name.StringgetOrigName()Return the original-name as set at creation.booleanhasAliases()Returnstrueif this symbol has aliases, i.e.voidrename(String newName)Rename this symbol with the givennewNameif not equalcurrent-name.
-
-
-
Method Detail
-
rename
void rename(String newName)
Rename this symbol with the givennewNameif not equalcurrent-name.Before renaming the
current-namewill be added to the list ofaliases. while the givennewNamewill be removed.Operation will be ignored if
newNameisnull.- Parameters:
newName- the newcurrent-name, maybenull
-
addAliasedName
void addAliasedName(String origName)
Add the givenorigNameto the list ofaliasesif not equalcurrent-name.Operation will be ignored if
newNameisnull.- Parameters:
origName- the new alias to be added, maybenull
-
hasAliases
boolean hasAliases()
Returnstrueif this symbol has aliases, i.e. either beingrenamedoraliases-added.Otherwise
falseis 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
nullor a zero sizedSetfor no aliases.
-
getOrigName
String getOrigName()
Return the original-name as set at creation.
-
getName
String getName()
Return the current-name, which is the lastrenamed-nameif issued, or theoriginal-name.
-
getAliasedString
String getAliasedString()
-
-