Package org.eclipse.cdt.utils
Class Addr32Factory
- java.lang.Object
-
- org.eclipse.cdt.utils.Addr32Factory
-
- All Implemented Interfaces:
IAddressFactory,IAddressFactory2
public class Addr32Factory extends java.lang.Object implements IAddressFactory2
-
-
Constructor Summary
Constructors Constructor Description Addr32Factory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description IAddresscreateAddress(java.lang.String addr)Creates address from string representation.IAddresscreateAddress(java.lang.String addr, boolean truncate)IAddresscreateAddress(java.lang.String addr, int radix)Creates address from string with given radix.IAddresscreateAddress(java.lang.String addr, int radix, boolean truncate)IAddresscreateAddress(java.math.BigInteger addr)Create address from a BigIntegerIAddresscreateAddress(java.math.BigInteger addr, boolean truncate)IAddressgetMax()Returns maximal address.IAddressgetZero()Returns zero address, i.e.
-
-
-
Method Detail
-
getZero
public IAddress getZero()
Description copied from interface:IAddressFactoryReturns zero address, i.e. minimal possible address- Specified by:
getZeroin interfaceIAddressFactory
-
getMax
public IAddress getMax()
Description copied from interface:IAddressFactoryReturns maximal address.- Specified by:
getMaxin interfaceIAddressFactory
-
createAddress
public IAddress createAddress(java.lang.String addr)
Description copied from interface:IAddressFactoryCreates 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.- Specified by:
createAddressin interfaceIAddressFactory
-
createAddress
public IAddress createAddress(java.lang.String addr, boolean truncate)
Description copied from interface:IAddressFactory2SeeIAddressFactory.createAddress(String). Same contract except that the constructor will throw a NumberFormatException if the supplied initializer value is out of range (when 'truncate' is false). IAddressFactory methods implicitly truncate if the value is out of range.- Specified by:
createAddressin interfaceIAddressFactory2
-
createAddress
public IAddress createAddress(java.lang.String addr, int radix)
Description copied from interface:IAddressFactoryCreates 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.- Specified by:
createAddressin interfaceIAddressFactory
-
createAddress
public IAddress createAddress(java.lang.String addr, int radix, boolean truncate)
Description copied from interface:IAddressFactory2SeeIAddressFactory.createAddress(String, int). Same contract except that the constructor will throw a NumberFormatException if the supplied initializer value is out of range (when 'truncate' is false). IAddressFactory methods implicitly truncate if the value is out of range.- Specified by:
createAddressin interfaceIAddressFactory2
-
createAddress
public IAddress createAddress(java.math.BigInteger addr)
Description copied from interface:IAddressFactoryCreate address from a BigInteger- Specified by:
createAddressin interfaceIAddressFactory
-
createAddress
public IAddress createAddress(java.math.BigInteger addr, boolean truncate)
Description copied from interface:IAddressFactory2SeeIAddressFactory.createAddress(BigInteger). Same contract except that the constructor will throw a NumberFormatException if the supplied initializer value is out of range (when 'truncate' is false). IAddressFactory methods implicitly truncate if the value is out of range.- Specified by:
createAddressin interfaceIAddressFactory2
-
-