com.adobe.flexbuilder.codemodel.definitions
Interface IFunction

All Superinterfaces:
IDefinition

public interface IFunction
extends IDefinition

Interface for a function definition.


Nested Class Summary
static class IFunction.FunctionClassification
          Function classifications (local, class member, interface member, and package member)
 
Method Summary
 IVariable[] getArguments()
          Get the arguments of this function as an array of IVariables
 IFunction.FunctionClassification getFunctionClassification()
          Get the classification for this function (local, argument, class member, etc)
 java.lang.String getReturnType()
          Get the return type of this function as a string.
 boolean isCastFunction()
          Is this a cast function?
 boolean isConstructor()
          Is this a constructor?
 boolean isGetter()
          Is this function a getter?
 boolean isImplementation()
          Determines whether this function is an implementation of a function from an implements Interface
 boolean isOverride()
          Is this function an override
 boolean isSetter()
          Is this function a setter?
 IFunction resolveImplementedFunction()
          Finds the definition of the IFunction that defines this function
 IFunction resolveOverriddenFunction()
          Finds the definition of the IFunction that we are over-ridding
 IType resolveReturnType(ASDefinitionCache cache)
          Look up this return type in the given scope and find its definition
 
Methods inherited from interface com.adobe.flexbuilder.codemodel.definitions.IDefinition
getContainingFilePath, getContainingSourceFilePath, getMetaTags, getName, getNameEnd, getNamespace, getNameStart, getPackageName, getQualifiedName, getShortName, hasModifier, hasNamespace, isImplicit, resolveNamespace
 

Method Detail

getArguments

public IVariable[] getArguments()
Get the arguments of this function as an array of IVariables

Returns:
the arguments of this function

getReturnType

public java.lang.String getReturnType()
Get the return type of this function as a string. This provides the return type as it appears in the definition, fully qualified or not (could be "Button" or "mx.controls.Button"). If you want more control over whether the name is fully qualified, use resolveReturnType instead.

Returns:
return type of this function

resolveReturnType

public IType resolveReturnType(ASDefinitionCache cache)
Look up this return type in the given scope and find its definition

Parameters:
cache - existing ASDefinitionCache which may contain definitions that can be reused (null is OK)
Returns:
definition node for the function's type

isConstructor

public boolean isConstructor()
Is this a constructor?

Returns:
true if the member is a constructor

isCastFunction

public boolean isCastFunction()
Is this a cast function?

Returns:
true if the member is a cast function

getFunctionClassification

public IFunction.FunctionClassification getFunctionClassification()
Get the classification for this function (local, argument, class member, etc)

Returns:
function classification

isGetter

public boolean isGetter()
Is this function a getter?

Returns:
true if the function is a getter

isSetter

public boolean isSetter()
Is this function a setter?

Returns:
true if the function is a setter

isOverride

public boolean isOverride()
Is this function an override

Returns:
true if we are an override

resolveOverriddenFunction

public IFunction resolveOverriddenFunction()
Finds the definition of the IFunction that we are over-ridding

Returns:
an IFunction or null

isImplementation

public boolean isImplementation()
Determines whether this function is an implementation of a function from an implements Interface

Returns:
true if this is an impl

resolveImplementedFunction

public IFunction resolveImplementedFunction()
Finds the definition of the IFunction that defines this function

Returns:
the parent IFunction or null