org.eclipse.xtext.util
Class SimpleAttributeResolver<K extends org.eclipse.emf.ecore.EObject,T>
java.lang.Object
org.eclipse.xtext.util.SimpleAttributeResolver<K,T>
- All Implemented Interfaces:
- com.google.common.base.Function<K,T>
public class SimpleAttributeResolver<K extends org.eclipse.emf.ecore.EObject,T>
- extends java.lang.Object
- implements com.google.common.base.Function<K,T>
- Author:
- Sebastian Zarnekow - Initial contribution and API
Method Summary |
T |
apply(K from)
|
org.eclipse.emf.ecore.EAttribute |
getAttribute(org.eclipse.emf.ecore.EObject object)
|
java.lang.Iterable<K> |
getMatches(java.lang.Iterable<K> candidates,
T value)
|
T |
getValue(K object)
|
static
|
newResolver(java.lang.Class<T> type,
java.lang.String attributeName)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface com.google.common.base.Function |
equals |
NAME_RESOLVER
public static final SimpleAttributeResolver<org.eclipse.emf.ecore.EObject,java.lang.String> NAME_RESOLVER
SimpleAttributeResolver
protected SimpleAttributeResolver(java.lang.Class<T> type,
java.lang.String attributeName)
newResolver
public static <K extends org.eclipse.emf.ecore.EObject,T> SimpleAttributeResolver<K,T> newResolver(java.lang.Class<T> type,
java.lang.String attributeName)
getAttribute
public org.eclipse.emf.ecore.EAttribute getAttribute(org.eclipse.emf.ecore.EObject object)
getValue
public T getValue(K object)
getMatches
public java.lang.Iterable<K> getMatches(java.lang.Iterable<K> candidates,
T value)
apply
public T apply(K from)
- Specified by:
apply
in interface com.google.common.base.Function<K extends org.eclipse.emf.ecore.EObject,T>