Package org.jboss.modules

# Class ClassSpec

java.lang.Object
org.jboss.modules.ClassSpec

public final class ClassSpec extends Object
A class definition specification.

Author:
  David M. Lloyd

## Constructor Summary

Constructors
Constructor
Description
`ClassSpec()`
Construct a new instance.

## Method Summary

Modifier and Type
Method
Description
`AssertionSetting`
`getAssertionSetting()`
Get the class assertion setting.
`ByteBuffer`
`getByteBuffer()`
Get the class byte buffer, if one is set.
`byte[]`
`getBytes()`
Get the class file bytes, if they are set.
`CodeSource`
`getCodeSource()`
Get the code source (should not be `null`).
`ClassSpec`
`setAssertionSetting(AssertionSetting assertionSetting)`
Set the class assertion setting.
`void`
`setAssertionSetting$$bridge(AssertionSetting assertionSetting)`
`ClassSpec`
`setByteBuffer(ByteBuffer byteBuffer)`
Set the class byte buffer.
`ClassSpec`
`setBytes(byte[] bytes)`
Set the class file bytes.
`void`
`setBytes$$bridge(byte[] bytes)`
`ClassSpec`
`setCodeSource(CodeSource codeSource)`
Set the code source (should not be `null`).
`void`
`setCodeSource$$bridge(CodeSource codeSource)`

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

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

## Constructor Details

### ClassSpec

public ClassSpec()
Construct a new instance.

## Method Details

### getBytes

public byte[] getBytes()
Get the class file bytes, if they are set.

Returns:
  the class file bytes, if they are set; `null` otherwise

### setBytes

public ClassSpec setBytes(byte[] bytes)
Set the class file bytes. Calling this method will clear any previously set `ByteBuffer`.

Parameters:
  `bytes` - the class file bytes
Returns:
  this class specification

### setBytes$$bridge

public void setBytes$$bridge(byte[] bytes)

### getByteBuffer

public ByteBuffer getByteBuffer()
Get the class byte buffer, if one is set.

Returns:
  the class byte buffer, if one is set; `null` otherwise

### setByteBuffer

public ClassSpec setByteBuffer(ByteBuffer byteBuffer)
Set the class byte buffer. Calling this method will clear any previously set class `byte[]`.

Parameters:
  `byteBuffer` - the class byte buffer
Returns:
  this class specification

### getCodeSource

public CodeSource getCodeSource()
Get the code source (should not be `null`).

Returns:
  the code source

### setCodeSource

public ClassSpec setCodeSource(CodeSource codeSource)
Set the code source (should not be `null`).

Parameters:
  `codeSource` - the code source
Returns:
  this class specification

### setCodeSource$$bridge

public void setCodeSource$$bridge(CodeSource codeSource)

### getAssertionSetting

public AssertionSetting getAssertionSetting()
Get the class assertion setting.

Returns:
  the assertion setting

### setAssertionSetting

public ClassSpec setAssertionSetting(AssertionSetting assertionSetting)
Set the class assertion setting.

Parameters:
  `assertionSetting` - the assertion setting
Returns:
  this class specification

### setAssertionSetting$$bridge

public void setAssertionSetting$$bridge(AssertionSetting assertionSetting)