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

E13403-02

oracle.javatools.parser.java.v1.symbol
Class MethodSymbol

java.lang.Object
  extended by oracle.javatools.parser.util.ArrayListHeap
      extended by oracle.javatools.parser.java.v1.symbol.JavaSymbol
          extended by oracle.javatools.parser.java.v1.symbol.HasModifiers
              extended by oracle.javatools.parser.java.v1.symbol.MemberSymbol
                  extended by oracle.javatools.parser.java.v1.symbol.MethodSymbol
All Implemented Interfaces:
JavaSyntaxCodes, Commentable, Nameable, Scope

public class MethodSymbol
extends MemberSymbol
implements Nameable

The MethodSymbol represents a method declaration.


Field Summary
 
Fields inherited from class oracle.javatools.parser.java.v1.symbol.MemberSymbol
CONSTRUCTOR, FIELD, INITIALIZER, INNER_CLASS, METHOD
 
Fields inherited from interface oracle.javatools.parser.java.v1.symbol.Scope
SCOPE_BLOCK, SCOPE_CATCH, SCOPE_CLASS, SCOPE_MEMBER, SCOPE_METHOD, SCOPE_ROOT, SCOPE_STATEMENT, SCOPE_TRY
 
Fields inherited from interface oracle.javatools.parser.java.v1.JavaSyntaxCodes
SYNTAX_ARGUMENTS, SYNTAX_ARRAY_CREATOR, SYNTAX_ARRAY_INITIALIZER, SYNTAX_ASG_OPERATOR, SYNTAX_BLOCK, SYNTAX_BRACKET_EXPRESSION, SYNTAX_BRACKETS_OPT, SYNTAX_BROKEN, SYNTAX_CATCH_CLAUSE, SYNTAX_CATCH_PAREN_EXPRESSION, SYNTAX_CLASS_CREATOR, SYNTAX_CLASS_DECLARATION, SYNTAX_CLASS_INITIALIZER, SYNTAX_CODE_ELEMENT, SYNTAX_CONSTRUCTOR_DECLARATION, SYNTAX_CONTROL_PAREN_EXPRESSION, SYNTAX_CREATOR, SYNTAX_DO_STATEMENT, SYNTAX_DOC_COMMENT, SYNTAX_ELSE_CLAUSE, SYNTAX_EXP_WRAPPER, SYNTAX_EXPRESSION, SYNTAX_EXPRESSION_OR_DECL, SYNTAX_EXTENDS, SYNTAX_FIELD_DECLARATION, SYNTAX_FINALLY_CLAUSE, SYNTAX_FOR_CONDITIONAL, SYNTAX_FOR_INIT, SYNTAX_FOR_PAREN_EXPRESSION, SYNTAX_FOR_STATEMENT, SYNTAX_FOR_UPDATE, SYNTAX_FORMAL_PARAMETER, SYNTAX_FORMAL_PARAMETER_LIST, SYNTAX_IDENTIFIER_PRIMARY, SYNTAX_IF_STATEMENT, SYNTAX_IMPLEMENTS, SYNTAX_IMPORT_DECLARATION, SYNTAX_INFIX_OPERATOR, SYNTAX_INIT_ARRAY_CREATOR, SYNTAX_INNER_CLASS_OR_INTERFACE, SYNTAX_INNER_CREATOR, SYNTAX_INTERFACE_DECLARATION, SYNTAX_JAVA_ROOT, SYNTAX_MEMBER_DECLARATION, SYNTAX_METHOD_DECLARATION, SYNTAX_MODIFIERS, SYNTAX_PACKAGE_DECLARATION, SYNTAX_PAREN_EXPRESSION, SYNTAX_POSTFIX_OPERATOR, SYNTAX_PREFIX_OPERATOR, SYNTAX_PRIMARY, SYNTAX_PRIMARY_BRACKETS, SYNTAX_PRIMARY_WORD, SYNTAX_QUALIFIED_IMPORT_NAME, SYNTAX_QUALIFIED_NAME, SYNTAX_QUALIFIED_PRIMARY, SYNTAX_QUES_OPERATOR, SYNTAX_SIMPLE_NAME, SYNTAX_SQLJ_CONTEXT, SYNTAX_SQLJ_STATEMENT, SYNTAX_STATEMENT, SYNTAX_SWITCH_BLOCK, SYNTAX_SWITCH_CASE, SYNTAX_SWITCH_STATEMENT, SYNTAX_SYNCH_STATEMENT, SYNTAX_THROWS, SYNTAX_TRY_STATEMENT, SYNTAX_TYPE, SYNTAX_TYPE_BODY, SYNTAX_TYPE_DECLARATION, SYNTAX_UNINIT_ARRAY_CREATOR, SYNTAX_UNPARSED_BLOCK, SYNTAX_UNPARSED_EXPRESSION, SYNTAX_UNPARSED_PAREN_EXPRESSION, SYNTAX_VARIABLE_DECLARATOR, SYNTAX_VARIABLE_INITIALIZER, SYNTAX_WHILE_STATEMENT
 
Method Summary
 VariableSymbol findVariable(java.lang.String name)
          If this scope contains local variables, method parameters, or declared member fields, check to see if one exists that matches the given name.
 NameSymbol getName()
          Gets the name symbol.
 VariableSymbol[] getParameters()
           
 TypeSymbol getReturnType()
           
 int getScopeType()
          Returns the type of this scope according to the enumeration.
 TypeSymbol[] getThrownTypes()
           
 NameSymbol[] getThrows()
           
 VariableSymbol[] getVariables()
           
 boolean isConstructor()
           
 void setName(NameSymbol name)
          Sets the name symbol.
 
Methods inherited from class oracle.javatools.parser.java.v1.symbol.MemberSymbol
findLabel, findType, getBlock, getCatchClauses, getClasses, getComment, getEnclosingScope, getLabels, getLocalClasses, isDeprecated, isHidden, setComment, setEnclosingScope, whatAmI
 
Methods inherited from class oracle.javatools.parser.java.v1.symbol.HasModifiers
getModifiers, setModifiers
 
Methods inherited from class oracle.javatools.parser.java.v1.symbol.JavaSymbol
getCode, getEndOffset, getParent, getStartOffset
 
Methods inherited from class oracle.javatools.parser.util.ArrayListHeap
allocArrayList, freeArrayList
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.javatools.parser.java.v1.symbol.Scope
getModifiers
 

Method Detail

isConstructor

public boolean isConstructor()
Returns:
True if this is a constructor. False otherwise.

getParameters

public VariableSymbol[] getParameters()
Returns:
The array of VariableSymbols for all the parameters in its formal parameter list.

getThrows

public NameSymbol[] getThrows()
Returns:
The array of NameSymbols for all the exceptions thrown by this method.

getThrownTypes

public TypeSymbol[] getThrownTypes()
Returns:
The array of TypeSymbols for all the exceptions thrown by this method.

getReturnType

public TypeSymbol getReturnType()
Returns:
The TypeSymbol for the return type of this method.

getScopeType

public int getScopeType()
Returns the type of this scope according to the enumeration. Yes, this is kind of redundant, but it's much faster than an if-else instanceof test.

Specified by:
getScopeType in interface Scope
Overrides:
getScopeType in class MemberSymbol

findVariable

public VariableSymbol findVariable(java.lang.String name)
If this scope contains local variables, method parameters, or declared member fields, check to see if one exists that matches the given name. If yes, return it. Return null, otherwise.

Specified by:
findVariable in interface Scope
Overrides:
findVariable in class MemberSymbol

getVariables

public VariableSymbol[] getVariables()
Specified by:
getVariables in interface Scope
Overrides:
getVariables in class MemberSymbol
Returns:
Retrieves all variables at this scope.

getName

public NameSymbol getName()
Description copied from interface: Nameable
Gets the name symbol.

Specified by:
getName in interface Nameable
Returns:
The NameSymbol associated with this object. Null if none.

setName

public void setName(NameSymbol name)
Description copied from interface: Nameable
Sets the name symbol.

Specified by:
setName in interface Nameable

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

E13403-02

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