Class LambdaExpression

All Implemented Interfaces:
IAnnotatable, IJavaElement, IMember, IParent, ISourceManipulation, ISourceReference, IType, org.eclipse.core.runtime.IAdaptable
Direct Known Subclasses:
BinaryLambdaExpression, ResolvedLambdaExpression

public class LambdaExpression extends SourceType
  • Field Details

    • sourceStart

      protected int sourceStart
    • sourceEnd

      protected int sourceEnd
    • arrowPosition

      protected int arrowPosition
    • interphase

      protected String interphase
  • Method Details

    • findLambdaSuperType

      public TypeBinding findLambdaSuperType(LambdaExpression lambdaExpression)
    • closing

      protected void closing(Object info) throws JavaModelException
      Description copied from class: SourceRefElement
      This element is being closed. Do any necessary cleanup.
      Overrides:
      closing in class SourceType
      Throws:
      JavaModelException
    • equals

      public boolean equals(Object o)
      Description copied from class: JavaElement
      Returns true if this handle represents the same Java element as the given handle. By default, two handles represent the same element if they are identical or if they represent the same type of element, have equal names, parents, and occurrence counts.

      If a subclass has other requirements for equality, this method must be overridden.

      Overrides:
      equals in class SourceType
      See Also:
      Object.equals(java.lang.Object)
    • hashCode

      public int hashCode()
      Description copied from class: JavaElement
      Returns the hash code for this Java element. By default, the hash code for an element is a combination of its name and parent's hash code. Elements with other requirements must override this method.
      Overrides:
      hashCode in class JavaElement
    • getElementInfo

      public Object getElementInfo(org.eclipse.core.runtime.IProgressMonitor monitor) throws JavaModelException
      Description copied from class: JavaElement
      Returns the info for this handle. If this element is not already open, it and all of its parents are opened. Does not return null. NOTE: BinaryType infos are NOT rooted under JavaElementInfo.
      Overrides:
      getElementInfo in class JavaElement
      Throws:
      JavaModelException - if the element is not present or not accessible
    • getHandleMementoDelimiter

      protected char getHandleMementoDelimiter()
      Description copied from class: JavaElement
      Returns the char that marks the start of this handles contribution to a memento.
      Overrides:
      getHandleMementoDelimiter in class Member
      See Also:
      JavaElement.getHandleMemento()
    • getHandleMemento

      protected void getHandleMemento(StringBuffer buff)
      Overrides:
      getHandleMemento in class SourceRefElement
    • getHandleMemento

      protected void getHandleMemento(StringBuffer buff, boolean serializeParent, boolean serializeChild)
    • getHandleFromMemento

      public IJavaElement getHandleFromMemento(String token, MementoTokenizer memento, WorkingCopyOwner workingCopyOwner)
      Overrides:
      getHandleFromMemento in class SourceType
    • getChildren

      public IJavaElement[] getChildren() throws JavaModelException
      Description copied from interface: IParent
      Returns the immediate children of this element. Unless otherwise specified by the implementing element, the children are in no particular order.
      Specified by:
      getChildren in interface IParent
      Overrides:
      getChildren in class JavaElement
      Returns:
      the immediate children of this element
      Throws:
      JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource
      See Also:
      IParent
    • isLocal

      public boolean isLocal()
      Description copied from interface: IType
      Returns whether this type represents a local type. For an anonymous type, this method returns true.

      Note: This deviates from JLS3 14.3, which states that anonymous types are not local types since they do not have a name.

      Specified by:
      isLocal in interface IType
      Overrides:
      isLocal in class SourceType
      Returns:
      true if this type represents a local type, false otherwise
      See Also:
      IType.isLocal()
    • resolved

      public JavaElement resolved(Binding binding)
      Overrides:
      resolved in class SourceType
    • getMethod

      public IMethod getMethod()
    • isLambda

      public boolean isLambda()
      Description copied from interface: IType
      Returns whether this type represents a lambda expression.
      Specified by:
      isLambda in interface IType
      Overrides:
      isLambda in class SourceType
      Returns:
      true if this type represents a lambda expression, false otherwise
    • isAnonymous

      public boolean isAnonymous()
      Description copied from interface: IType
      Returns whether this type represents an anonymous type.
      Specified by:
      isAnonymous in interface IType
      Overrides:
      isAnonymous in class SourceType
      Returns:
      true if this type represents an anonymous type, false otherwise
      See Also:
      IType.isAnonymous()
    • toStringName

      public void toStringName(StringBuffer buffer)
      Description copied from class: JavaElement
      Debugging purposes
      Overrides:
      toStringName in class SourceRefElement
    • getPrimaryElement

      public IJavaElement getPrimaryElement(boolean checkOwner)
      Overrides:
      getPrimaryElement in class SourceType
    • getSuperInterfaceTypeSignatures

      public String[] getSuperInterfaceTypeSignatures() throws JavaModelException
      Description copied from interface: IType
      Returns the type signatures of the interfaces that this type implements or extends, in the order in which they are listed in the source.

      For classes and enum types, this gives the interfaces that this class implements. For interfaces and annotation types, this gives the interfaces that this interface extends. An empty collection is returned if this type does not implement or extend any interfaces. For anonymous types, an empty collection is always returned.

      The type signatures may be either unresolved (for source types) or resolved (for binary types), and either basic (for basic types) or rich (for parameterized types). See Signature for details.

      Specified by:
      getSuperInterfaceTypeSignatures in interface IType
      Overrides:
      getSuperInterfaceTypeSignatures in class SourceType
      Returns:
      the type signatures of interfaces that this type implements or extends, in the order in which they are listed in the source, an empty collection if none
      Throws:
      JavaModelException - if this element does not exist or if an exception occurs while accessing its corresponding resource.
      See Also:
      IType.getSuperInterfaceTypeSignatures()