|
org.netbeans.modules.xml.xam/1 1.18.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.xml.xam.AbstractReference<T>
org.netbeans.modules.xml.xam.dom.AbstractNamedComponentReference<T>
public abstract class AbstractNamedComponentReference<T extends NamedReferenceable>
Abstract implementation of reference by name to a component. On writing, this indirection help serialize the referenced component as an attribute string value. On reading, the referenced can be resolved on demand.
Note: Client code should always check for brokeness before access the referenced.
| Field Summary | |
|---|---|
protected String |
localName
|
protected String |
prefix
|
protected QName |
qname
|
| Fields inherited from class org.netbeans.modules.xml.xam.AbstractReference |
|---|
refString |
| Constructor Summary | |
|---|---|
AbstractNamedComponentReference(Class<T> referencedType,
AbstractDocumentComponent parent,
String ref)
Constructor for reading. |
|
AbstractNamedComponentReference(T referenced,
Class<T> referencedType,
AbstractDocumentComponent parent)
Constructor for writing. |
|
| Method Summary | |
|---|---|
protected QName |
calculateQNameLocally()
Calculate the QName based on the local information without loading the referenced object. |
protected void |
checkParentNotRemovedFromModel()
|
protected void |
checkParentPartOfModel()
|
boolean |
equals(Object obj)
|
protected String |
getLocalName()
|
protected AbstractDocumentComponent |
getParent()
Returns parent referencing component. |
protected String |
getPrefix()
|
QName |
getQName()
Note this method will first attempt to build the QName base on local lookup before trying to resolve the referenced. |
protected T |
getReferenced()
Access method for referenced. |
String |
getRefString()
|
int |
hashCode()
|
boolean |
references(T target)
Return true if this reference refers to target. |
void |
refresh()
|
| Methods inherited from class org.netbeans.modules.xml.xam.AbstractReference |
|---|
getType, isBroken, setReferenced, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface org.netbeans.modules.xml.xam.dom.NamedComponentReference |
|---|
getEffectiveNamespace |
| Methods inherited from interface org.netbeans.modules.xml.xam.Reference |
|---|
get, getType, isBroken |
| Field Detail |
|---|
protected String prefix
protected String localName
protected QName qname
| Constructor Detail |
|---|
public AbstractNamedComponentReference(T referenced,
Class<T> referencedType,
AbstractDocumentComponent parent)
referenced - the component being referencedreferencedType - type of the referenced componentparent - referencing component on which the referenced is serialized
as an attribute string value.
public AbstractNamedComponentReference(Class<T> referencedType,
AbstractDocumentComponent parent,
String ref)
referencedType - type of the referenced componentparent - referencing component on which the referenced is serialized
as an attribute string value.ref - the string value used in resolving.| Method Detail |
|---|
public boolean references(T target)
references in interface Reference<T extends NamedReferenceable>references in class AbstractReference<T extends NamedReferenceable>public String getRefString()
getRefString in interface Reference<T extends NamedReferenceable>getRefString in class AbstractReference<T extends NamedReferenceable>protected String getPrefix()
protected String getLocalName()
protected T getReferenced()
AbstractReference
getReferenced in class AbstractReference<T extends NamedReferenceable>public QName getQName()
getQName in interface NamedComponentReference<T extends NamedReferenceable>IllegalStateException - if referencing component is discarded from
the model.protected AbstractDocumentComponent getParent()
getParent in class AbstractReference<T extends NamedReferenceable>protected void checkParentPartOfModel()
IllegalStateException - if parent is not part of a model.protected void checkParentNotRemovedFromModel()
IllegalStateException - if parent is already removed from a model.protected QName calculateQNameLocally()
public boolean equals(Object obj)
equals in class AbstractReference<T extends NamedReferenceable>public int hashCode()
hashCode in class AbstractReference<T extends NamedReferenceable>public void refresh()
|
org.netbeans.modules.xml.xam/1 1.18.0 1 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||