|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface Contextual
An object that belongs to a SciJava application context.
Method Summary | |
---|---|
Context |
context()
Gets the application context to which the object belongs. |
Context |
getContext()
Gets the application context to which the object belongs, or null if setContext(Context) has not yet been called on this object. |
void |
setContext(Context context)
Sets the application context to which the object belongs. |
Method Detail |
---|
Context context()
NullContextException
- if the context has not yet been set via
setContext(Context)
.getContext()
Context getContext()
setContext(Context)
has not yet been called on this object.
context()
void setContext(Context context)
Typically this method simply delegates to Context.inject(Object)
,
and should be called only once to populate the context. Most contextual
objects do not support later alteration of the context, and will throw
IllegalStateException
if this method is invoked again.
IllegalStateException
- If the object already has a context.
IllegalArgumentException
- If the object has a required
Service
parameter (see Parameter.required()
)
which is not available from the context.Context.inject(Object)
,
for an example of how to implement this interface
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |