Package org.eclipse.cdt.core
Interface IAddressFactory
- All Known Subinterfaces:
IAddressFactory2
- All Known Implementing Classes:
Addr32Factory
,Addr64Factory
public interface IAddressFactory
This inteface serves as an address factory. If you need to
implement your own addresses, you should extend this.
Please see Addr32Factory and Addr64Factory to see how it can be implemented.
-
Method Summary
Modifier and TypeMethodDescriptioncreateAddress
(String addr) Creates address from string representation.createAddress
(String addr, int radix) Creates address from string with given radix.createAddress
(BigInteger addr) Create address from a BigIntegergetMax()
Returns maximal address.getZero()
Returns zero address, i.e.
-
Method Details
-
getZero
IAddress getZero()Returns zero address, i.e. minimal possible address -
getMax
IAddress getMax()Returns maximal address. -
createAddress
Creates address from string representation. 1. Method should be able to create address from hex address string (string produced with IAddress.toHexAddressString() method). 2. Method should be case insensetive 3. Method should be able to create address from decimal address representation 4. Method should throw NumberFormatException if the given string cannot be decoded. 5. Method should not attempt to evaluate string as expression (i.e., "0x1000 + 5" should not result in an IAddress for 0x1005.) Input must be a straightforward, absolute value. Please see Addr32Factory.createAddress() for reference implementation.- Parameters:
addr
-
-
createAddress
Creates address from string with given radix. Given string should not contain any prefixes or sign numbers. Method should be case insensetive Method should throw NumberFormatException if the given string cannot be decoded. Method should not attempt to evaluate string as expression (i.e., "1000 + 5" should not result in an IAddress for 1005.) Input must be a straightforward, absolute value.- Parameters:
addr
-radix
-
-
createAddress
Create address from a BigInteger- Parameters:
addr
-
-