public class LambdaMethod extends SourceMethod
parameterTypesnameoccurrenceCountJEM_ANNOTATION, JEM_CLASSFILE, JEM_COMPILATIONUNIT, JEM_COUNT, JEM_DELIMITER_ESCAPE, JEM_ESCAPE, JEM_FIELD, JEM_IMPORTDECLARATION, JEM_INITIALIZER, JEM_JAVAPROJECT, JEM_LAMBDA_EXPRESSION, JEM_LAMBDA_METHOD, JEM_LOCALVARIABLE, JEM_METHOD, JEM_PACKAGEDECLARATION, JEM_PACKAGEFRAGMENT, JEM_PACKAGEFRAGMENTROOT, JEM_STRING, JEM_TYPE, JEM_TYPE_PARAMETER, NO_ELEMENTS, NO_INFO, parentANNOTATION, CLASS_FILE, COMPILATION_UNIT, FIELD, IMPORT_CONTAINER, IMPORT_DECLARATION, INITIALIZER, JAVA_MODEL, JAVA_PROJECT, LOCAL_VARIABLE, METHOD, PACKAGE_DECLARATION, PACKAGE_FRAGMENT, PACKAGE_FRAGMENT_ROOT, TYPE, TYPE_PARAMETER| Modifier and Type | Method and Description |
|---|---|
protected void |
closing(java.lang.Object info)
This element is being closed.
|
boolean |
equals(java.lang.Object o)
Returns true if this handle represents the same Java element
as the given handle.
|
java.lang.Object |
getElementInfo(IProgressMonitor monitor)
Returns the info for this handle.
|
void |
getHandleMemento(java.lang.StringBuffer buff) |
void |
getHandleMemento(java.lang.StringBuffer buff,
boolean serializeParent) |
protected char |
getHandleMementoDelimiter()
Returns the
char that marks the start of this handles
contribution to a memento. |
java.lang.String |
getKey()
Returns the binding key for this method only if the given method is
resolved. |
java.lang.String |
getReturnType()
Returns the type signature of the return value of this method.
|
java.lang.String |
getSignature()
Returns the signature of this method.
|
int |
hashCode()
Returns the hash code for this Java element.
|
boolean |
isLambdaMethod()
Returns whether this method represents a lambda expression.
|
boolean |
isResolved()
Returns whether this method represents a resolved method.
|
JavaElement |
resolved(Binding binding) |
getDefaultValue, getElementType, getExceptionTypes, getNumberOfParameters, getParameterNames, getParameters, getParameterTypes, getPrimaryElement, getRawParameterNames, getTypeParameter, getTypeParameters, getTypeParameterSignatures, isConstructor, isMainMethod, isSimilar, readableName, toStringInfo, toStringName, toStringNamegetElementName, getFullyQualifiedName, getFullyQualifiedParameterizedName, getKey, getKey, getKey, getOccurrenceCountSignature, getPackageFragment, getTypeQualifiedName, resolveType, resolveTypeareSimilarMethods, convertConstant, findMethods, getCategories, getClassFile, getDeclaringType, getFlags, getHandleFromMemento, getJavadocRange, getNameRange, getOuterMostLocalContext, getType, getTypeRoot, isBinary, isMainMethod, isReadOnlycopy, createElementInfo, delete, findNode, generateInfos, getAnnotation, getAnnotations, getCompilationUnit, getCorrespondingResource, getHandleUpdatingCountFromMemento, getOccurrenceCount, getOpenableParent, getPath, getSource, getSourceRange, getUnderlyingResource, hasChildren, isStructureKnown, move, rename, resourceappendEscapedDelimiter, close, escapeMementoName, exists, getAncestor, getAttachedJavadoc, getChildren, getChildrenOfType, getElementInfo, getHandleFromMemento, getHandleIdentifier, getHandleMemento, getJavadocBaseLocation, getJavaModel, getJavaProject, getLibraryJavadocLocation, getOpenable, getParent, getPrimaryElement, getResource, getSchedulingRule, getSourceElementAt, getSourceMapper, getURLContents, isAncestorOf, newDoesNotExistStatus, newJavaModelException, newNotPresentException, openWhenClosed, tabString, toDebugString, toString, toString, toStringAncestors, toStringChildren, toStringInfo, toStringWithAncestors, toStringWithAncestors, unresolved, validateAndCacheclone, finalize, getClass, notify, notifyAll, wait, wait, waitgetElementNamegetCategories, getClassFile, getCompilationUnit, getDeclaringType, getFlags, getJavadocRange, getOccurrenceCount, getType, getTypeRoot, isBinaryexists, getAncestor, getAttachedJavadoc, getCorrespondingResource, getHandleIdentifier, getJavaModel, getJavaProject, getOpenable, getParent, getPath, getPrimaryElement, getResource, getSchedulingRule, getUnderlyingResource, isReadOnly, isStructureKnownexists, getNameRange, getSource, getSourceRangecopy, delete, move, renamegetChildren, hasChildrengetAnnotation, getAnnotationspublic java.lang.String getReturnType()
throws JavaModelException
IMethod
For example, a source method declared as public String getName()
would return "QString;".
The type signature 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.
getReturnType in interface IMethodgetReturnType in class SourceMethodJavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resource.IMethodpublic java.lang.String getSignature()
throws JavaModelException
IMethod
For example, a source method declared as public void foo(String text, int length)
would return "(QString;I)V".
The type signatures embedded in the method signature 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.
getSignature in interface IMethodgetSignature in class SourceMethodJavaModelException - if this element does not exist or if an
exception occurs while accessing its corresponding resource.IMethodpublic boolean isLambdaMethod()
IMethodisLambdaMethod in interface IMethodisLambdaMethod in class SourceMethodIMethod.isLambdaMethod()protected void closing(java.lang.Object info)
SourceRefElementclosing in class SourceMethodpublic boolean equals(java.lang.Object o)
JavaElementIf a subclass has other requirements for equality, this method must be overridden.
equals in class SourceMethodObject.equals(java.lang.Object)public java.lang.Object getElementInfo(IProgressMonitor monitor)
throws JavaModelException
JavaElementgetElementInfo in class JavaElementJavaModelException - if the element is not present or not accessiblepublic void getHandleMemento(java.lang.StringBuffer buff,
boolean serializeParent)
public void getHandleMemento(java.lang.StringBuffer buff)
getHandleMemento in class SourceMethodJavaElement.getHandleMemento(StringBuffer)protected char getHandleMementoDelimiter()
JavaElementchar that marks the start of this handles
contribution to a memento.getHandleMementoDelimiter in class SourceMethodJavaElement.getHandleMemento()public java.lang.String getKey()
IMethodresolved.
A binding key is a key that uniquely identifies this method. It allows access to:
Object.getClass()If the given method is not resolved, the returned key is simply the java element's key.
getKey in interface IMethodgetKey in class SourceMethodIBinding.getKey(),
BindingKey,
IMethod.isResolved()public int hashCode()
JavaElementhashCode in class SourceMethodJavaElement.hashCode()public boolean isResolved()
IMethodisResolved in interface IMethodisResolved in class SourceMethodpublic JavaElement resolved(Binding binding)
resolved in class SourceMethod