Package util.demangler
Class GenericDemangledObject
- java.lang.Object
-
- util.demangler.GenericDemangledObject
-
- Direct Known Subclasses:
GenericDemangledAddressTable
,GenericDemangledFunction
,GenericDemangledString
,GenericDemangledVariable
public abstract class GenericDemangledObject extends java.lang.Object
A class to represent a demangled object.
-
-
Field Summary
Fields Modifier and Type Field Description protected static java.lang.String
AT
protected java.lang.String
basedName
protected static java.lang.String
EMPTY_STRING
protected boolean
isConst
protected boolean
isPointer64
protected boolean
isRestrict
protected boolean
isStatic
protected boolean
isStruct
protected boolean
isThunk
protected boolean
isUnaligned
protected boolean
isUnsigned
protected boolean
isVirtual
protected boolean
isVolatile
protected java.lang.String
memberScope
protected java.lang.String
name
protected GenericDemangledType
namespace
protected static java.lang.String
NAMESPACE_SEPARATOR
protected java.lang.String
originalMangled
protected static java.lang.String
SPACE
protected java.lang.String
specialMidfix
protected java.lang.String
specialPrefix
protected java.lang.String
specialSuffix
protected java.lang.String
storageClass
protected java.lang.String
visibility
-
Constructor Summary
Constructors Constructor Description GenericDemangledObject()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected java.lang.String
generatePlateComment()
java.lang.String
getBasedName()
java.lang.String
getMemberScope()
java.lang.String
getName()
Returns the name of the demangled object.GenericDemangledType
getNamespace()
Returns the namespace containing this demangled object.java.lang.String
getOriginalMangled()
abstract java.lang.String
getSignature(boolean format)
Returns a complete signature for the demangled symbol.java.lang.String
getSpecialMidfix()
java.lang.String
getSpecialPrefix()
java.lang.String
getSpecialSuffix()
java.lang.String
getStorageClass()
java.lang.String
getVisibility()
boolean
isConst()
boolean
isPointer64()
boolean
isRestrict()
boolean
isStatic()
boolean
isThunk()
boolean
isUnaligned()
boolean
isVirtual()
boolean
isVolatile()
protected java.lang.String
pad(int len)
void
setBasedName(java.lang.String basedName)
void
setConst(boolean isConst)
void
setMemberScope(java.lang.String memberScope)
void
setName(java.lang.String name)
Sets the name of the demangled objectvoid
setNamespace(GenericDemangledType namespace)
void
setOriginalMangled(java.lang.String mangled)
Sets the original mangled namevoid
setPointer64(boolean isPointer64)
void
setRestrict()
void
setSignature(java.lang.String signature)
Sets the signature.void
setSpecialMidfix(java.lang.String chargeType)
void
setSpecialPrefix(java.lang.String special)
void
setSpecialSuffix(java.lang.String specialSuffix)
void
setStatic(boolean isStatic)
void
setStorageClass(java.lang.String storageClass)
void
setStruct()
void
setThunk(boolean isThunk)
void
setUnaligned()
void
setUnsigned()
void
setVirtual(boolean isVirtual)
void
setVisibilty(java.lang.String visibility)
void
setVolatile(boolean isVolatile)
java.lang.String
toString()
-
-
-
Field Detail
-
NAMESPACE_SEPARATOR
protected static final java.lang.String NAMESPACE_SEPARATOR
- See Also:
- Constant Field Values
-
AT
protected static final java.lang.String AT
- See Also:
- Constant Field Values
-
EMPTY_STRING
protected static final java.lang.String EMPTY_STRING
- See Also:
- Constant Field Values
-
SPACE
protected static final java.lang.String SPACE
- See Also:
- Constant Field Values
-
originalMangled
protected java.lang.String originalMangled
-
specialPrefix
protected java.lang.String specialPrefix
-
specialMidfix
protected java.lang.String specialMidfix
-
specialSuffix
protected java.lang.String specialSuffix
-
namespace
protected GenericDemangledType namespace
-
visibility
protected java.lang.String visibility
-
storageClass
protected java.lang.String storageClass
-
name
protected java.lang.String name
-
isConst
protected boolean isConst
-
isVolatile
protected boolean isVolatile
-
isStatic
protected boolean isStatic
-
isVirtual
protected boolean isVirtual
-
isThunk
protected boolean isThunk
-
isPointer64
protected boolean isPointer64
-
isStruct
protected boolean isStruct
-
isUnsigned
protected boolean isUnsigned
-
isUnaligned
protected boolean isUnaligned
-
isRestrict
protected boolean isRestrict
-
basedName
protected java.lang.String basedName
-
memberScope
protected java.lang.String memberScope
-
-
Method Detail
-
getName
public java.lang.String getName()
Returns the name of the demangled object.- Returns:
- the name of the demangled object
-
isConst
public boolean isConst()
-
setConst
public void setConst(boolean isConst)
-
isVolatile
public boolean isVolatile()
-
setVolatile
public void setVolatile(boolean isVolatile)
-
isStatic
public boolean isStatic()
-
setStatic
public void setStatic(boolean isStatic)
-
isVirtual
public boolean isVirtual()
-
setVirtual
public void setVirtual(boolean isVirtual)
-
isThunk
public boolean isThunk()
-
setThunk
public void setThunk(boolean isThunk)
-
isPointer64
public boolean isPointer64()
-
setPointer64
public void setPointer64(boolean isPointer64)
-
setUnsigned
public void setUnsigned()
-
setStruct
public void setStruct()
-
setUnaligned
public void setUnaligned()
-
isUnaligned
public boolean isUnaligned()
-
setRestrict
public void setRestrict()
-
isRestrict
public boolean isRestrict()
-
getBasedName
public java.lang.String getBasedName()
-
setBasedName
public void setBasedName(java.lang.String basedName)
-
getMemberScope
public java.lang.String getMemberScope()
-
setMemberScope
public void setMemberScope(java.lang.String memberScope)
-
setName
public void setName(java.lang.String name)
Sets the name of the demangled object- Parameters:
name
- the new name
-
setOriginalMangled
public void setOriginalMangled(java.lang.String mangled)
Sets the original mangled name- Parameters:
mangled
- the original mangled name
-
getOriginalMangled
public java.lang.String getOriginalMangled()
-
getNamespace
public GenericDemangledType getNamespace()
Returns the namespace containing this demangled object.- Returns:
- the namespace containing this demangled object
-
setNamespace
public void setNamespace(GenericDemangledType namespace)
- Parameters:
namespace
-
-
getVisibility
public java.lang.String getVisibility()
-
setVisibilty
public void setVisibilty(java.lang.String visibility)
-
getStorageClass
public java.lang.String getStorageClass()
-
setStorageClass
public void setStorageClass(java.lang.String storageClass)
-
getSpecialPrefix
public java.lang.String getSpecialPrefix()
-
setSpecialPrefix
public void setSpecialPrefix(java.lang.String special)
-
getSpecialMidfix
public java.lang.String getSpecialMidfix()
-
setSpecialMidfix
public void setSpecialMidfix(java.lang.String chargeType)
-
getSpecialSuffix
public java.lang.String getSpecialSuffix()
-
setSpecialSuffix
public void setSpecialSuffix(java.lang.String specialSuffix)
-
getSignature
public abstract java.lang.String getSignature(boolean format)
Returns a complete signature for the demangled symbol. For example: "unsigned long foo" "unsigned char * ClassA::getFoo(float, short *)" "void * getBar(int **, MyStruct &)" Note: based on the underlying mangling scheme, the return type may or may not be specified in the signature.- Parameters:
format
- true if signature should be pretty printed- Returns:
- a complete signature for the demangled symbol
-
setSignature
public void setSignature(java.lang.String signature)
Sets the signature. Calling this method will override the auto-generated signature.- Parameters:
signature
- the signature
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
generatePlateComment
protected java.lang.String generatePlateComment()
-
pad
protected java.lang.String pad(int len)
-
-