# Class: com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterDescriptionEntry

Description of a processor register.

## Constructor: RegisterDescriptionEntry
- parameter: `number`, type: `int`
- parameter: `name`, type: `java.lang.String`
- parameter: `bitsize`, type: `int`
- parameter: `encoding`, type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterEncoding`
- parameter: `alternateName`, type: `java.lang.String`
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterType`
- parameter: `offset`, type: `int`

Description: Full constructor.
parameter: number: mandatory
parameter: name: mandatory
parameter: bitsize: mandatory
parameter: encoding: optional
parameter: alternateName: optional
parameter: type: optional
parameter: offset: optional

## Method: addName
- parameter: `name`, type: `java.lang.String`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterDescriptionEntry`

Description: Add a name for this register.
parameter: name: a name, cannot be empty or null; it can be a primary name or an alternate name
return: this object \(allows chained calls\)

## Method: enc
- parameter: `encoding`, type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterEncoding`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterDescriptionEntry`

Description: Set the register encoding.
parameter: encoding: register encoding
return: this entry

## Method: getBitend
- return type: `int`

Description: Retrieve the exclusive end bit of this register slice.
return: end bit, or the register size for physical registers

## Method: getBitsize
- return type: `int`

Description: Get the register size in bits.
return: register size in bits

## Method: getBitstart
- return type: `int`

Description: Retrieve the first bit of this register slice.
return: start bit, or 0 for physical registers

## Method: getContainer
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterDescriptionEntry`

Description: Retrieve the physical register that owns this slice.
return: containing register

## Method: getEncoding
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterEncoding`

Description: Retrieve the register encoding.
return: never null

## Method: getId
- return type: `long`

Description: Opaque register id used by [processor](IProcessor) objects.
return: the id

## Method: getName
- return type: `java.lang.String`

Description: Get the primary name.
return: non\-null, non\-empty

## Method: getNames
- return type: `java.util.List<java.lang.String>`

Description: Get all the names for the register. The first entry in the list is the primary name.
return: a list containing at least one entry

## Method: getNumber
- return type: `int`

Description: Get the optional register number used to locate the register in its bank.
return: register number

## Method: getOffset
- return type: `int`

Description: Get the optional offset in a block of registers, meaningful in the context of the layout this entry belongs to.
return: \-1 if unspecified

## Method: getPureId
- return type: `long`

Description: Retrieve the pure register id, without size and bit offset encoding.
return: pure register id

## Method: getSize
- return type: `int`

Description: Get the register size in bytes, rounded up \(eg, if the register is 6\-bit long, the returned byte size will be 1\).
return: register size in bytes

## Method: getSlice
- parameter: `bitstart`, type: `int`
- parameter: `bitend`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterDescriptionEntry`

Description: Retrieve a slice by bit range.
parameter: bitstart: start bit
parameter: bitend: exclusive end bit
return: matching slice, or null

## Method: getSlices
- return type: `java.util.List<com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterDescriptionEntry>`

Description: Retrieve slices defined on this physical register.
return: register slices

## Method: getType
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterType`

Description: Retrieve the register type.
return: never null

## Method: grp
- parameter: `grp`, type: `int`
- parameter: `idx`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterDescriptionEntry`

Description: Defines the group from which register belongs.
parameter: grp: register group
parameter: idx: register index in the group
return: the register entry \(NOT the defined group\)

## Method: hasName
- parameter: `candidateName`, type: `java.lang.String`
- return type: `boolean`

Description: Determine if this register uses the provided name \(case\-insensitive\).
parameter: candidateName: candidate name
return: true if the name matches

## Method: hasName
- parameter: `candidateName`, type: `java.lang.String`
- parameter: `caseSensitive`, type: `boolean`
- return type: `boolean`

Description: Determine if this register uses the provided name.
parameter: candidateName: candidate name
parameter: caseSensitive: true to use case\-sensitive matching
return: true if the name matches

## Method: hasName
- parameter: `candidateNames`, type: `java.util.Collection<java.lang.String>`
- return type: `boolean`

Description: Determine if this register uses any of the provided names \(case\-insensitive\).
parameter: candidateNames: candidate names
return: true if any name matches

## Method: hasName
- parameter: `candidateNames`, type: `java.util.Collection<java.lang.String>`
- parameter: `caseSensitive`, type: `boolean`
- return type: `boolean`

Description: Determine if this register uses any of the provided names.
parameter: candidateNames: candidate names
parameter: caseSensitive: true to use case\-sensitive matching
return: true if any name matches

## Method: isPhysicalRegister
- return type: `boolean`

Description: Determine whether this entry describes a physical register.
return: true for a physical register

## Method: isRegisterSlice
- return type: `boolean`

Description: Determine whether this entry describes a register slice.
return: true for a register slice

## Method: setOffset
- parameter: `offset`, type: `int`

Description: Set the optional offset in a block of registers.
parameter: offset: register offset

## Method: sl
- parameter: `name`, type: `java.lang.String`
- parameter: `bitstart`, type: `int`
- parameter: `bitend`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterDescriptionEntry`

Description: Define a slice of a [RegisterDescriptionEntry](RegisterDescriptionEntry)
parameter: name: slice name
parameter: bitstart: start bit
parameter: bitend: end bit \(excluded\)
return: the register entry \(NOT the defined slice\)

## Method: sl
- parameter: `name`, type: `java.lang.String`
- parameter: `bitsize`, type: `int`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterDescriptionEntry`

Description: Define a slice of a [RegisterDescriptionEntry](RegisterDescriptionEntry), with bitstart at 0. Use [#sl(String, int, int)](#sl(String, int, int)) if bitstart is different.
parameter: name: name of the slice register
parameter: bitsize: bitsize of the slice. Must be `<=` to current bitsize.
return: the register entry \(NOT the defined slice\)

## Method: toString
- return type: `java.lang.String`


## Method: typ
- parameter: `type`, type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterType`
- return type: `com.pnfsoftware.jeb.core.units.code.asm.processor.RegisterDescriptionEntry`

Description: Set the register type.
parameter: type: register type
return: the register entry \(NOT the defined type\)

## Method: verifyPhysicalRegister

Description: Verify that this entry describes a physical register.
throws: if this entry is a register slice

## Method: verifyRegisterSlice

Description: Verify that this entry describes a register slice.
throws: if this entry is a physical register

