org.eclipse.xtext.naming
Class DefaultDeclarativeQualifiedNameProvider

java.lang.Object
  extended by org.eclipse.xtext.naming.IQualifiedNameProvider.AbstractImpl
      extended by org.eclipse.xtext.naming.DefaultDeclarativeQualifiedNameProvider
All Implemented Interfaces:
com.google.common.base.Function<org.eclipse.emf.ecore.EObject,QualifiedName>, IQualifiedNameProvider
Direct Known Subclasses:
XbaseQualifiedNameProvider

public class DefaultDeclarativeQualifiedNameProvider
extends IQualifiedNameProvider.AbstractImpl

computes the fully qualified name of an EObject by first invoking a method
QulifiedName qualifiedName(MyType ele)
reflectively. And if no such method is found looks up a property 'name' and invokes the value and appends it to the eContainer's qualifiedName

Author:
Sven Efftinge - Initial contribution and API, Jan Koehnlein

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.eclipse.xtext.naming.IQualifiedNameProvider
IQualifiedNameProvider.AbstractImpl
 
Constructor Summary
DefaultDeclarativeQualifiedNameProvider()
           
 
Method Summary
protected  IQualifiedNameConverter getConverter()
           
 QualifiedName getFullyQualifiedName(org.eclipse.emf.ecore.EObject obj)
           
protected  com.google.common.base.Function<org.eclipse.emf.ecore.EObject,java.lang.String> getResolver()
           
protected  QualifiedName qualifiedName(java.lang.Object ele)
          Default for qualifiedName dispatcher.
 
Methods inherited from class org.eclipse.xtext.naming.IQualifiedNameProvider.AbstractImpl
apply
 
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
 

Constructor Detail

DefaultDeclarativeQualifiedNameProvider

public DefaultDeclarativeQualifiedNameProvider()
Method Detail

getResolver

protected com.google.common.base.Function<org.eclipse.emf.ecore.EObject,java.lang.String> getResolver()

getFullyQualifiedName

public QualifiedName getFullyQualifiedName(org.eclipse.emf.ecore.EObject obj)
Returns:
the qualified name for the given object, null if this IQualifiedNameProvider is not responsible or if the given object doesn't have qualified name.

qualifiedName

protected QualifiedName qualifiedName(java.lang.Object ele)
Default for qualifiedName dispatcher. Write a method with this signature but custom Type for dispatching other types.

Since:
2.3

getConverter

protected IQualifiedNameConverter getConverter()