org.eclipse.xtext.xbase.scoping.featurecalls
Class XFeatureCallSugarDescriptionProvider

java.lang.Object
  extended by org.eclipse.xtext.xbase.scoping.featurecalls.DefaultJvmFeatureDescriptionProvider
      extended by org.eclipse.xtext.xbase.scoping.featurecalls.XFeatureCallSugarDescriptionProvider
All Implemented Interfaces:
IFeaturesForTypeProvider, IJvmFeatureDescriptionProvider

public class XFeatureCallSugarDescriptionProvider
extends DefaultJvmFeatureDescriptionProvider

Constructs sugared JvmFeatureDescriptions for - XFeatureCall - XMemberFeatureCall - XBinaryOperation This includes operator overloading for XBinaryOperation, invocation of unparameterized methods without parenthesis, and access to getters using the property name (i.e. getFoo -> foo)

Author:
Sven Efftinge - Initial contribution and API

Nested Class Summary
 
Nested classes/interfaces inherited from class org.eclipse.xtext.xbase.scoping.featurecalls.DefaultJvmFeatureDescriptionProvider
DefaultJvmFeatureDescriptionProvider.ShadowingAwareAcceptor
 
Field Summary
 
Fields inherited from class org.eclipse.xtext.xbase.scoping.featurecalls.DefaultJvmFeatureDescriptionProvider
contextType, featuresForTypeProvider, implicitArgument, implicitReceiver, preferStatics, priority, signatureProvider, visibilityService
 
Constructor Summary
XFeatureCallSugarDescriptionProvider()
           
 
Method Summary
 void addFeatureDescriptions(JvmFeature feature, ITypeArgumentContext context, IAcceptor<JvmFeatureDescription> acceptor)
           
protected  void doCollectDescriptions(java.lang.String name, IFeaturesForTypeProvider featureProvider, JvmTypeReference typeReference, ITypeArgumentContext context, java.lang.Iterable<JvmTypeReference> hierarchy, IAcceptor<JvmFeatureDescription> acceptor)
           
protected  java.lang.String getPropertyNameForGetterMethod(java.lang.String opName)
           
protected  int getSyntacticalNumberOfArguments(JvmOperation op)
           
protected  boolean isGetterMethod(JvmOperation op)
           
 void setOperatorMapping(OperatorMapping operatorMapping)
           
 
Methods inherited from class org.eclipse.xtext.xbase.scoping.featurecalls.DefaultJvmFeatureDescriptionProvider
createJvmFeatureDescription, createJvmFeatureDescription, createJvmFeatureDescription, doCollectDescriptions, getAllDescriptions, getAllFeatures, getDescriptionsByName, getFeaturesByName, getImplicitArgument, getImplicitReceiver, getNumberOfIrrelevantArguments, getPriority, getSignature, isExtensionProvider, isValidStaticState, isVisible, setContextType, setFeaturesForTypeProvider, setImplicitArgument, setImplicitReceiver, setPreferStatics, setPriority, setVisibilityService, toString
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

XFeatureCallSugarDescriptionProvider

public XFeatureCallSugarDescriptionProvider()
Method Detail

setOperatorMapping

public void setOperatorMapping(OperatorMapping operatorMapping)

doCollectDescriptions

protected void doCollectDescriptions(java.lang.String name,
                                     IFeaturesForTypeProvider featureProvider,
                                     JvmTypeReference typeReference,
                                     ITypeArgumentContext context,
                                     java.lang.Iterable<JvmTypeReference> hierarchy,
                                     IAcceptor<JvmFeatureDescription> acceptor)
Overrides:
doCollectDescriptions in class DefaultJvmFeatureDescriptionProvider

addFeatureDescriptions

public void addFeatureDescriptions(JvmFeature feature,
                                   ITypeArgumentContext context,
                                   IAcceptor<JvmFeatureDescription> acceptor)
Overrides:
addFeatureDescriptions in class DefaultJvmFeatureDescriptionProvider

getSyntacticalNumberOfArguments

protected int getSyntacticalNumberOfArguments(JvmOperation op)

isGetterMethod

protected boolean isGetterMethod(JvmOperation op)

getPropertyNameForGetterMethod

protected java.lang.String getPropertyNameForGetterMethod(java.lang.String opName)