Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.9.0)

E52944-01


oracle.javatools.parser.java.v2.model
Interface SourceMethod

All Superinterfaces:
Element, JavaElement, JavaHasAnnotations, JavaHasName, JavaHasType, JavaIsGeneric, JavaMember, JavaMethod, SourceElement, SourceHasBlock, SourceHasModifiers, SourceHasName, SourceMember

public interface SourceMethod
extends SourceMember, SourceHasName, SourceHasBlock, JavaMethod

A SourceMethod is the syntactic (aka symbolic) representation of a java method or constructor declaration.


Field Summary
static SourceMethod[] EMPTY_ARRAY
           
static int PRINT_DECLARATION
          "modifiers lt;type_parameters> return_type name( type name...
static int PRINT_SIGNATURE
          "name( type...

 

Fields inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
CHILDREN_ALL, CHILDREN_BLANKLINES, CHILDREN_COMMENTS, CHILDREN_default, CHILDREN_none, CHILDREN_REGULAR, PRINT_ALL, REFORMAT_ALL, REFORMAT_INDENT

 

Method Summary
 SourceFormalParameterList getFormalParameterList()
          Gets the formal parameter list object.
 java.util.List getSourceExceptions()
          Gets the list of source exception types.
 java.util.List getSourceParameters()
          Gets the list of source parameters.
 SourceTypeReference getSourceReturnType()
          Gets the source return type.
 java.util.List getSourceTypeParameters()
          Gets the declared type parameters on this method.
 SourceThrowsClause getThrowsClause()
          Gets the throws clause object.
 boolean isConstructor()
          True if this is a constructor.
 boolean isVarargs()
          Tests if this method is modified by ACC_VARARGS.
 void setSourceReturnType(SourceTypeReference type)
          Attempts to set the return type of this method.

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceMember
getDocComment, getEnclosingClass, hasDeprecatedTag, hasHiddenTag, setDocComment

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceHasModifiers
addModifiers, getModifiers, getSourceAnnotations, removeModifiers, setModifiers

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceElement
addSelf, addSelf, addSelfAfter, addSelfBefore, clearBinding, cloneSelf, compile, getBinding, getChildren, getChildren, getCompiledObject, getContainedElements, getEndOffset, getOwningFile, getOwningSourceFile, getParent, getSiblingAfter, getSiblingBefore, getSiblings, getSiblings, getStartOffset, getSymbolKind, getText, print, print, reformatSelf, removeSelf, replaceSelf, resolve, setBinding, setContext, visitSelf

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceHasName
getName, getNameElement, setName, setNameElement

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.SourceHasBlock
getBlock, setBlock

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaMethod
equals, getDefaultValue, getDescriptor, getExceptions, getMethodErasure, getOverriddenMethods, getParameters, getParameterTypes, getReturnType, getSignature, getTypeSignature, hasSubsignatureOf, isNative

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaIsGeneric
getActualTypeArguments, getTypeParameter, getTypeParameters, hasActualTypeArguments, hasTypeParameters

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaMember
getOwningClass, getUniqueIdentifier, isAbstract, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasType
getResolvedType, getUnresolvedType

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasName
getName

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasAnnotations
getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations

 

Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaElement
getElementKind, getFile, getModifiers, getOwner, getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic, printCompiledInfo

 

Field Detail

EMPTY_ARRAY

static final SourceMethod[] EMPTY_ARRAY

PRINT_SIGNATURE

static final int PRINT_SIGNATURE
"name( type... )"
See Also:
Constant Field Values

PRINT_DECLARATION

static final int PRINT_DECLARATION
"modifiers lt;type_parameters> return_type name( type name... )"
See Also:
Constant Field Values

Method Detail

isConstructor

boolean isConstructor()
True if this is a constructor.
Specified by:
isConstructor in interface JavaMethod
Returns:
True if this is a constructor. False otherwise.

isVarargs

boolean isVarargs()
Tests if this method is modified by ACC_VARARGS.
Specified by:
isVarargs in interface JavaMethod
Returns:
True if this is a variable arguments method. False otherwise.

getSourceTypeParameters

java.util.List getSourceTypeParameters()
Gets the declared type parameters on this method. For methods, syntax is "javadoc mods <ty_params> return_ty method...". Constructors may not declare type parameters.
Returns:
The array of type parameters. May be zero-length. Returns a collection of SourceTypeParameter's.

getSourceReturnType

SourceTypeReference getSourceReturnType()
Gets the source return type.
Returns:
The SourceTypeReference for the return type of this method. Null if this is a constructor.

setSourceReturnType

void setSourceReturnType(SourceTypeReference type)
Attempts to set the return type of this method.
Throws:
java.lang.UnsupportedOperationException - if this is a constructor.

getSourceParameters

java.util.List getSourceParameters()
Gets the list of source parameters.
Returns:
The array of SourceVariables for all the parameters in its formal parameter list. May be zero-length. Includes the synthetic "this$0" parameter where applicable. Returns a collection of SourceVariable's.

getSourceExceptions

java.util.List getSourceExceptions()
Gets the list of source exception types.
Returns:
The array of SourceTypeReferences for all the exceptions thrown by this method. May be zero-length. Returns a collection of SourceTypeReference's.

getFormalParameterList

SourceFormalParameterList getFormalParameterList()
Gets the formal parameter list object.
Returns:
The SourceFormalParameterList that wraps the formal parameters.

getThrowsClause

SourceThrowsClause getThrowsClause()
Gets the throws clause object.
Returns:
The SourceThrowsClause that wraps the thrown exception types.

Skip navigation links

Oracle Fusion Middleware Java API Reference for Oracle Extension SDK Reference
11g Release 1 (11.1.1.9.0)

E52944-01


Copyright © 1997, 2015, Oracle. All rights reserved.