Java org.eclipse.jdt.core IMethod fields, constructors, methods, implement or subclass

Example usage for Java org.eclipse.jdt.core IMethod fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.eclipse.jdt.core IMethod.

The text is from its open source code.

Implementation

org.eclipse.jdt.core.IMethod has the following implementations.
Click this link to see all its implementation.

Method

booleanexists()
Returns whether this Java element exists in the model.
IJavaElementgetAncestor(int ancestorType)
Returns this Java element or the first ancestor of this element that has the given type.
IAnnotationgetAnnotation(String name)
Returns the annotation with the given name declared on this element.
IAnnotation[]getAnnotations()
Returns the annotations for this element.
StringgetAttachedJavadoc(IProgressMonitor monitor)

Returns the Javadoc as HTML source if this element has attached Javadoc, null otherwise.

This should be used only for binary elements.

IClassFilegetClassFile()
Returns the class file in which this member is declared, or null if this member is not declared in a class file (for example, a source type).
ICompilationUnitgetCompilationUnit()
Returns the compilation unit in which this member is declared, or null if this member is not declared in a compilation unit (for example, a binary type).
ITypegetDeclaringType()
Returns the type in which this member is declared, or null if this member is not declared in a type (for example, a top-level type).
IMemberValuePairgetDefaultValue()
Returns a IMemberValuePair member value pair representing the default value of this method if any, or null if this method's parent is not an annotation type, or else if this method does not have a default value.
StringgetElementName()
Returns the simple name of this method.
intgetElementType()
Returns this element's kind encoded as an integer.
String[]getExceptionTypes()
Returns the type signatures of the exceptions this method throws, in the order declared in the source.
intgetFlags()
Returns the modifier flags for this member.
StringgetHandleIdentifier()
Returns a string representation of this element handle.
ISourceRangegetJavadocRange()
Returns the Javadoc range if this element is from source or if this element is a binary element with an attached source, null otherwise.
IJavaProjectgetJavaProject()
Returns the Java project this element is contained in, or null if this element is not contained in any Java project (for instance, the IJavaModel is not contained in any Java project).
StringgetKey()
Returns the binding key for this method only if the given method is #isResolved() resolved .
intgetNumberOfParameters()
Returns the number of parameters of this method.
IOpenablegetOpenable()
Returns the first openable parent.
String[]getParameterNames()
Returns the names of parameters in this method.
ILocalVariable[]getParameters()
Returns the parameters of this method.
String[]getParameterTypes()
Returns the type signatures for the parameters of this method.
IJavaElementgetParent()
Returns the element directly containing this element, or null if this element has no parent.
IPathgetPath()
Returns the path to the innermost resource enclosing this element.
IJavaElementgetPrimaryElement()
Returns the primary element (whose compilation unit is the primary compilation unit) this working copy element was created from, or this element if it is a descendant of a primary compilation unit or if it is not a descendant of a working copy (e.g.
String[]getRawParameterNames()
Returns the names of parameters in this method.
IResourcegetResource()
Returns the innermost resource enclosing this element.
StringgetReturnType()
Returns the type signature of the return value of this method.
StringgetSignature()
Returns the signature of this method.
ITypegetType(String name, int occurrenceCount)
Returns the local or anonymous type declared in this source member with the given simple name and/or with the specified position relative to the order they are defined in the source.
ITypeParametergetTypeParameter(String name)
Returns the type parameter declared in this method with the given name.
ITypeParameter[]getTypeParameters()
Returns the formal type parameters for this method.
ITypeRootgetTypeRoot()
Returns the Java type root in which this member is declared.
IResourcegetUnderlyingResource()
Returns the smallest underlying resource that contains this element, or null if this element is not contained in a resource.
booleanisBinary()
Returns whether this member is from a class file.
booleanisConstructor()
Returns whether this method is a constructor.
booleanisLambdaMethod()
Returns whether this method represents a lambda expression.
booleanisMainMethod()
Returns whether this method is a main method.
booleanisReadOnly()
Returns whether this Java element is read-only.
booleanisResolved()
Returns whether this method represents a resolved method.
booleanisSimilar(IMethod method)
Returns whether this method is similar to the given method.