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

Field Summary
 
Fields inherited from class org.eclipse.xtext.xbase.scoping.featurecalls.DefaultJvmFeatureDescriptionProvider
contextType, featuresForTypeProvider, implicitReceiver, signatureProvider, visibilityService
 
Constructor Summary
XFeatureCallSugarDescriptionProvider()
           
 
Method Summary
 void addFeatureDescriptions(JvmFeature feature, TypeArgumentContext context, IAcceptor<JvmFeatureDescription> acceptor)
          called for each feature in the current context type's type hierarchy.
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, getFeaturesForType, getSignature, getText, isExtensionProvider, isValid, setContextType, setFeaturesForTypeProvider, setImplicitReceiver, setVisibilityService
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XFeatureCallSugarDescriptionProvider

public XFeatureCallSugarDescriptionProvider()
Method Detail

setOperatorMapping

public void setOperatorMapping(OperatorMapping operatorMapping)

addFeatureDescriptions

public void addFeatureDescriptions(JvmFeature feature,
                                   TypeArgumentContext context,
                                   IAcceptor<JvmFeatureDescription> acceptor)
Description copied from interface: IJvmFeatureDescriptionProvider
called for each feature in the current context type's type hierarchy.

Specified by:
addFeatureDescriptions in interface IJvmFeatureDescriptionProvider
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)