org.eclipse.xtend.backend.functions
Class AbstractFunction

java.lang.Object
  extended by org.eclipse.xtend.backend.functions.AbstractFunction
All Implemented Interfaces:
Function
Direct Known Subclasses:
AbstractClosure, Closure, JavaDefinedFunction, JavaOperation, SourceDefinedFunction

public abstract class AbstractFunction
extends java.lang.Object
implements Function

This convenience implementation provides default implementations for many of the Function methods.

Author:
Arno Haase (http://www.haase-consulting.com)

Field Summary
protected  BackendType _returnType
           
 
Constructor Summary
AbstractFunction(ExpressionBase guard, java.util.List<? extends BackendType> parameterTypes, BackendType returnType, boolean cached)
           
 
Method Summary
 FunctionDefContext getFunctionDefContext()
           
 ExpressionBase getGuard()
          returns the expression that guards this function - or null, if there is no guard.
 java.util.List<? extends BackendType> getParameterTypes()
           
 BackendType getReturnType()
           
 boolean isCached()
           
 void setFunctionDefContext(FunctionDefContext fdc)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.eclipse.xtend.backend.common.Function
invoke
 

Field Detail

_returnType

protected final BackendType _returnType
Constructor Detail

AbstractFunction

public AbstractFunction(ExpressionBase guard,
                        java.util.List<? extends BackendType> parameterTypes,
                        BackendType returnType,
                        boolean cached)
Method Detail

getGuard

public ExpressionBase getGuard()
Description copied from interface: Function
returns the expression that guards this function - or null, if there is no guard.

Specified by:
getGuard in interface Function

getParameterTypes

public java.util.List<? extends BackendType> getParameterTypes()
Specified by:
getParameterTypes in interface Function

isCached

public boolean isCached()
Specified by:
isCached in interface Function

getFunctionDefContext

public FunctionDefContext getFunctionDefContext()
Specified by:
getFunctionDefContext in interface Function

setFunctionDefContext

public void setFunctionDefContext(FunctionDefContext fdc)
Specified by:
setFunctionDefContext in interface Function

getReturnType

public BackendType getReturnType()
Specified by:
getReturnType in interface Function