public class PackageState
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
static int |
STATE_CONFIGURED
A constant defining that the package has been loaded and configured.
|
static int |
STATE_ERROR
A constant defining that the package produced an error and is not available.
|
static int |
STATE_INITIALIZED
A constant defining that the package was initialized and is ready to use.
|
static int |
STATE_NEW
A constant defining that the package is new.
|
Constructor and Description |
---|
PackageState(Module module)
Creates a new package state for the given module.
|
PackageState(Module module,
int state)
Creates a new package state for the given module.
|
Modifier and Type | Method and Description |
---|---|
boolean |
configure()
Configures the module and raises the state to STATE_CONFIGURED if the
module is not yet configured.
|
boolean |
equals(java.lang.Object o)
Compares this object with the given other object for equality.
|
Module |
getModule()
Returns the module managed by this state implementation.
|
int |
getState()
Returns the current state of the module.
|
int |
hashCode()
Computes a hashcode for this package state.
|
boolean |
initialize()
Initializes the contained module and raises the set of the module to
STATE_INITIALIZED, if the module was not yet initialized.
|
public static final int STATE_NEW
public static final int STATE_CONFIGURED
public static final int STATE_INITIALIZED
public static final int STATE_ERROR
public PackageState(Module module)
module
- the module.public PackageState(Module module, int state)
module
- the module.state
- the initial statepublic boolean configure()
public Module getModule()
public int getState()
public boolean initialize()
public boolean equals(java.lang.Object o)
equals
in class java.lang.Object
o
- the other object to be comparedObject.equals(java.lang.Object)
public int hashCode()
hashCode
in class java.lang.Object
Object.hashCode()