Package org.eclipse.cdt.utils

## Class Symbol

- java.lang.Object
- - org.eclipse.cdt.utils.Symbol

All Implemented Interfaces:
  `Comparable<Object>`, `IBinaryParser.ISymbol`

Direct Known Subclasses:
  `GNUSymbol`, `SomSymbol`, `XCoffSymbol`

    public class Symbol
    extends Object
    implements IBinaryParser.ISymbol

### Field Summary

Fields
`protected BinaryObjectAdapter` `binary`

### Fields inherited from interface org.eclipse.cdt.core.IBinaryParser.ISymbol

`FUNCTION, VARIABLE`

### Constructor Summary

Constructors
`Symbol​(BinaryObjectAdapter binary, String name, int type, IAddress addr, long size)`
`Symbol​(BinaryObjectAdapter binary, String name, int type, IAddress addr, long size, org.eclipse.core.runtime.IPath sourceFile, int startLine, int endLine)`

### Method Summary

All Methods Instance Methods Concrete Methods
`int` `compareTo​(Object obj)`
`IAddress` `getAddress()` Address of the symbol
`IBinaryParser.IBinaryObject` `getBinaryObject()` Return the binary object this symbol is from.
`int` `getEndLine()` End line number of the symbol in the source
`org.eclipse.core.runtime.IPath` `getFilename()` Source filename of the symbol.
`int` `getLineNumber​(long offset)` Line number corresponding to the address offset.
`String` `getName()` Name of the Symbol
`long` `getSize()` Size of the symbol.
`int` `getStartLine()` Start linenumber of the symbol in the source
`int` `getType()` Type of the symbol

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### binary

    protected final BinaryObjectAdapter binary

### Constructor Detail

#### Symbol

    public Symbol​(BinaryObjectAdapter binary,
                  String name,
                  int type,
                  IAddress addr,
                  long size,
                  org.eclipse.core.runtime.IPath sourceFile,
                  int startLine,
                  int endLine)

#### Symbol

    public Symbol​(BinaryObjectAdapter binary,
                  String name,
                  int type,
                  IAddress addr,
                  long size)

### Method Detail

#### getBinaryObject

    public IBinaryParser.IBinaryObject getBinaryObject()

Description copied from interface: `IBinaryParser.ISymbol`
Return the binary object this symbol is from.

Specified by:
  `getBinaryObject` in interface `IBinaryParser.ISymbol`

#### getFilename

    public org.eclipse.core.runtime.IPath getFilename()

Description copied from interface: `IBinaryParser.ISymbol`
Source filename of the symbol.

Specified by:
  `getFilename` in interface `IBinaryParser.ISymbol`

#### getName

    public String getName()

Description copied from interface: `IBinaryParser.ISymbol`
Name of the Symbol

Specified by:
  `getName` in interface `IBinaryParser.ISymbol`

#### getType

    public int getType()

Description copied from interface: `IBinaryParser.ISymbol`
Type of the symbol

Specified by:
  `getType` in interface `IBinaryParser.ISymbol`

#### getAddress

    public IAddress getAddress()

Description copied from interface: `IBinaryParser.ISymbol`
Address of the symbol

Specified by:
  `getAddress` in interface `IBinaryParser.ISymbol`

#### getEndLine

    public int getEndLine()

Description copied from interface: `IBinaryParser.ISymbol`
End line number of the symbol in the source

Specified by:
  `getEndLine` in interface `IBinaryParser.ISymbol`

#### getStartLine

    public int getStartLine()

Description copied from interface: `IBinaryParser.ISymbol`
Start linenumber of the symbol in the source

Specified by:
  `getStartLine` in interface `IBinaryParser.ISymbol`

#### getLineNumber

    public int getLineNumber​(long offset)

Description copied from interface: `IBinaryParser.ISymbol`
Line number corresponding to the address offset.

Specified by:
  `getLineNumber` in interface `IBinaryParser.ISymbol`

#### getSize

    public long getSize()

Description copied from interface: `IBinaryParser.ISymbol`
Size of the symbol.

Specified by:
  `getSize` in interface `IBinaryParser.ISymbol`

#### compareTo

    public int compareTo​(Object obj)

Specified by:
  `compareTo` in interface `Comparable<Object>`