Package org.eclipse.cdt.utils.elf.parser

# Class ElfBinaryObject

java.lang.Object
org.eclipse.core.runtime.PlatformObject
org.eclipse.cdt.utils.BinaryFile
org.eclipse.cdt.utils.BinaryObjectAdapter
org.eclipse.cdt.utils.elf.parser.ElfBinaryObject

All Implemented Interfaces:
  `IBinaryParser.IBinaryFile`, `IBinaryParser.IBinaryObject`, `org.eclipse.core.runtime.IAdaptable`

Direct Known Subclasses:
  `ElfBinaryExecutable`, `ElfBinaryShared`, `GNUElfBinaryObject`

public class ElfBinaryObject extends BinaryObjectAdapter

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.cdt.utils.BinaryObjectAdapter

`BinaryObjectAdapter.BinaryObjectInfo`

## Field Summary

### Fields inherited from class org.eclipse.cdt.utils.BinaryObjectAdapter

`NO_SYMBOLS`

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

`ARCHIVE, CORE, EXECUTABLE, OBJECT, SHARED`

## Constructor Summary

Constructors
Constructor
Description
`ElfBinaryObject(IBinaryParser parser, org.eclipse.core.runtime.IPath p, int type)`
`ElfBinaryObject(IBinaryParser parser, org.eclipse.core.runtime.IPath p, AR.ARHeader h)`

## Method Summary

Modifier and Type
Method
Description
`protected void`
`addSymbols(Elf.Symbol[] array, int type, List<Symbol> list)`
`<T> T`
`getAdapter(Class<T> adapter)`
`IAddressFactory`
`getAddressFactory()`
`protected BinaryObjectAdapter.BinaryObjectInfo`
`getBinaryObjectInfo()`
`InputStream`
`getContents()`
`String`
`getCPU()`
CPU name
`protected ElfHelper`
`getElfHelper()`
`String`
`getName()`
The name of the object
`IBinaryParser.ISymbol[]`
`getSymbols()`
Symbols of the object
`boolean`
`isLittleEndian()`
The endian
`protected void`
`loadAll()`
`protected void`
`loadInfo()`
`protected void`
`loadInfo(ElfHelper helper)`
`protected void`
`loadSymbols(ElfHelper helper)`

### Methods inherited from class org.eclipse.cdt.utils.BinaryObjectAdapter

`getBSS, getData, getNeededSharedLibs, getSoName, getSymbol, getText, hasDebug, toString`

### Methods inherited from class org.eclipse.cdt.utils.BinaryFile

`getBinaryParser, getPath, getType, hasChanged`

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

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

### Methods inherited from interface org.eclipse.cdt.core.IBinaryParser.IBinaryFile

`getBinaryParser, getPath, getType`

## Constructor Details

### ElfBinaryObject

public ElfBinaryObject(IBinaryParser parser, org.eclipse.core.runtime.IPath p, AR.ARHeader h)

### ElfBinaryObject

public ElfBinaryObject(IBinaryParser parser, org.eclipse.core.runtime.IPath p, int type)

## Method Details

### getName

public String getName()
Description copied from interface: `IBinaryParser.IBinaryObject`
The name of the object

Specified by:
  `getName` in interface `IBinaryParser.IBinaryObject`
Overrides:
  `getName` in class `BinaryObjectAdapter`
Returns:
  String
See Also:
  - `IBinaryParser.IBinaryObject.getName()`

### getContents

public InputStream getContents() throws IOException

Specified by:
  `getContents` in interface `IBinaryParser.IBinaryFile`
Overrides:
  `getContents` in class `BinaryFile`
Returns:
  the binary contents.
Throws:
  `IOException`
See Also:
  - `IBinaryParser.IBinaryFile.getContents()`

### getSymbols

public IBinaryParser.ISymbol[] getSymbols()
Description copied from interface: `IBinaryParser.IBinaryObject`
Symbols of the object

Specified by:
  `getSymbols` in interface `IBinaryParser.IBinaryObject`
Specified by:
  `getSymbols` in class `BinaryObjectAdapter`
Returns:
  ISymbol[] arrays of symbols
See Also:
  - `IBinaryParser.IBinaryObject.getSymbols()`

### getBinaryObjectInfo

protected BinaryObjectAdapter.BinaryObjectInfo getBinaryObjectInfo()

Specified by:
  `getBinaryObjectInfo` in class `BinaryObjectAdapter`

### getElfHelper

protected ElfHelper getElfHelper() throws IOException

Throws:
  `IOException`

### loadAll

protected void loadAll() throws IOException

Throws:
  `IOException`

### loadInfo

protected void loadInfo() throws IOException

Throws:
  `IOException`

### loadInfo

protected void loadInfo(ElfHelper helper) throws IOException

Throws:
  `IOException`

### loadSymbols

protected void loadSymbols(ElfHelper helper) throws IOException

Throws:
  `IOException`

### addSymbols

protected void addSymbols(Elf.Symbol[] array, int type, List<Symbol> list)

### getAdapter

public <T> T getAdapter(Class<T> adapter)

Specified by:
  `getAdapter` in interface `org.eclipse.core.runtime.IAdaptable`
Overrides:
  `getAdapter` in class `org.eclipse.core.runtime.PlatformObject`

### getAddressFactory

public IAddressFactory getAddressFactory()

Specified by:
  `getAddressFactory` in interface `IBinaryParser.IBinaryObject`
Specified by:
  `getAddressFactory` in class `BinaryObjectAdapter`

### isLittleEndian

public boolean isLittleEndian()
Description copied from interface: `IBinaryParser.IBinaryObject`
The endian

Specified by:
  `isLittleEndian` in interface `IBinaryParser.IBinaryObject`
Overrides:
  `isLittleEndian` in class `BinaryObjectAdapter`
Returns:
  boolean - true for little endian
See Also:
  - `IBinaryParser.IBinaryObject.isLittleEndian()`

### getCPU

public String getCPU()
Description copied from interface: `IBinaryParser.IBinaryObject`
CPU name

Specified by:
  `getCPU` in interface `IBinaryParser.IBinaryObject`
Overrides:
  `getCPU` in class `BinaryObjectAdapter`
Returns:
  String - cpu name
See Also:
  - `IBinaryParser.IBinaryObject.getCPU()`