Package org.eclipse.xtext.findReferences
Interface TargetURIs
-
- All Superinterfaces:
java.lang.Iterable<org.eclipse.emf.common.util.URI>,com.google.common.base.Predicate<org.eclipse.emf.common.util.URI>,java.util.function.Predicate<org.eclipse.emf.common.util.URI>
- All Known Implementing Classes:
TargetURISet
public interface TargetURIs extends java.lang.Iterable<org.eclipse.emf.common.util.URI>, com.google.common.base.Predicate<org.eclipse.emf.common.util.URI>Encapsulate the searched data. Clients may choose to attach more information to the target URIs by means ofputUserData(Key, Object). This information can be obtained in later processing steps to optimize the reference lookup. If different clients (e.g. different languages) try to share user data, they have to agree on a givenkey.
-
-
Nested Class Summary
Nested Classes Modifier and Type Interface Description static classTargetURIs.Key<T>A user data key with equalitiy semantics on the type of the value and the logical name of the key.
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidaddAllURIs(java.lang.Iterable<org.eclipse.emf.common.util.URI> uris)Adds all the uris to this set of targets.voidaddURI(org.eclipse.emf.common.util.URI uri)Add the given uri to this set of targets.java.util.Set<org.eclipse.emf.common.util.URI>asSet()Returns aSetview on this resource URIs.booleancontains(org.eclipse.emf.common.util.URI uri)Returnstrueif the uri is contained in this set of targets.booleancontainsResource(org.eclipse.emf.common.util.URI resourceURI)Returnstrueif this set of targets contains at least one element from the given resourceURI.java.util.Collection<org.eclipse.emf.common.util.URI>getEObjectURIs(org.eclipse.emf.common.util.URI resourceURI)Return all targets that are defined in the given resource.java.util.Collection<org.eclipse.emf.common.util.URI>getTargetResourceURIs()Returns the collection of target resource URIs, e.g.<T> TgetUserData(TargetURIs.Key<T> key)Read the user data with the given key.booleanisEmpty()Returnstrueif there is no target URI yet.<T> voidputUserData(TargetURIs.Key<T> key, T data)Store user data with the given key.intsize()Returns the number of known target object URIs.
-
-
-
Method Detail
-
getUserData
<T> T getUserData(TargetURIs.Key<T> key)
Read the user data with the given key. Returnsnullis no such user data is available.
-
putUserData
<T> void putUserData(TargetURIs.Key<T> key, T data)
Store user data with the given key.
-
addURI
void addURI(org.eclipse.emf.common.util.URI uri)
Add the given uri to this set of targets.
-
addAllURIs
void addAllURIs(java.lang.Iterable<org.eclipse.emf.common.util.URI> uris)
Adds all the uris to this set of targets.
-
getTargetResourceURIs
java.util.Collection<org.eclipse.emf.common.util.URI> getTargetResourceURIs()
Returns the collection of target resource URIs, e.g. URIs without a fragment.
-
getEObjectURIs
java.util.Collection<org.eclipse.emf.common.util.URI> getEObjectURIs(org.eclipse.emf.common.util.URI resourceURI)
Return all targets that are defined in the given resource.
-
contains
boolean contains(org.eclipse.emf.common.util.URI uri)
Returnstrueif the uri is contained in this set of targets.
-
containsResource
boolean containsResource(org.eclipse.emf.common.util.URI resourceURI)
Returnstrueif this set of targets contains at least one element from the given resourceURI.
-
isEmpty
boolean isEmpty()
Returnstrueif there is no target URI yet.
-
size
int size()
Returns the number of known target object URIs.
-
asSet
java.util.Set<org.eclipse.emf.common.util.URI> asSet()
Returns aSetview on this resource URIs.
-
-