|
org.netbeans.modules.registry/1 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.netbeans.api.registry.ObjectRef
public final class ObjectRef
Identification of the object bound in a context. Object is identified by the context in which it is bound and by its binding name.
ObjectRef instance can be stored to Context by method
Context.putObject(java.lang.String, java.lang.Object)
. There are two options for retrieval.
Calling Context.getRef(java.lang.String)
method on bound ObjectRef instance returns
that instance. Calling Context.getObject(java.lang.String, java.lang.Object)
, however, will
recursively dereference ObjectRef instance and return directly object the
ObjectRef points to. If ObjectRef is invalid or referenced binding does not
exist the ObjectRef instance is returned.
Constructor Summary | |
---|---|
ObjectRef(Context context,
String bindingName)
Constructs a new ObjectRef. |
|
ObjectRef(Context rootContext,
String absoluteContextName,
String bindingName)
Constructs a new instance of ObjectRef. |
Method Summary | |
---|---|
boolean |
equals(Object o)
|
String |
getBindingName()
Binding name under which is this object bound. |
Context |
getContext()
Context in which the object is bound. |
String |
getContextAbsoluteName()
Absolute context name of the context in which the object is bound. |
Object |
getObject()
Getter for the object referenced by this instance. |
int |
hashCode()
|
boolean |
isValid()
Is the object reference valid? |
String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public ObjectRef(Context rootContext, String absoluteContextName, String bindingName)
rootContext
- root context. See Context.getRootContext()
absoluteContextName
- absolute name of context relative to root context. See Context.getAbsoluteContextName()
bindingName
- name of bindingpublic ObjectRef(Context context, String bindingName)
context
- contextbindingName
- name of bindingMethod Detail |
---|
public Context getContext()
public String getContextAbsoluteName()
public String getBindingName()
public Object getObject()
public boolean isValid()
public boolean equals(Object o)
public int hashCode()
public String toString()
|
org.netbeans.modules.registry/1 1.8 | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |