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

E13403-03

oracle.javatools.parser.java.v2.common
Class AbstractMethod

java.lang.Object
  extended by oracle.javatools.parser.java.v2.common.AbstractElement
      extended by oracle.javatools.parser.java.v2.common.AbstractMethod
All Implemented Interfaces:
JavaConstants, JavaErrors, JavaOperators, JavaPreferences, JavaTokens, Element, JavaElement, JavaHasAnnotations, JavaHasName, JavaHasType, JavaIsGeneric, JavaMember, JavaMethod
Direct Known Subclasses:
QuickMethod, WrapperMethod

public abstract class AbstractMethod
extends AbstractElement
implements JavaMethod

An abstract implementation of JavaMethod. Provided so that all implementations have a consistent behavior for equals(O) and hashCode(). Check QuickMethod before you extend AbstractMethod. It might already contain what you need.


Nested Class Summary
 
Nested classes/interfaces inherited from interface oracle.javatools.parser.java.v2.JavaPreferences
JavaPreferences.MemberOrder
 
Field Summary
 
Fields inherited from interface oracle.javatools.parser.java.v2.model.JavaMethod
EMPTY_ARRAY
 
Fields inherited from interface oracle.javatools.parser.java.v2.JavaConstants
ACC_ABSTRACT, ACC_ANNOTATION, ACC_BRIDGE, ACC_ENUM, ACC_FINAL, ACC_INTERFACE, ACC_NATIVE, ACC_none, ACC_PRIVATE, ACC_PROTECTED, ACC_PUBLIC, ACC_STATIC, ACC_STRICTFP, ACC_SUPER, ACC_SYNCHRONIZED, ACC_SYNTHETIC, ACC_TRANSIENT, ACC_VARARGS, ACC_VOLATILE, ACCX_DEPRECATED, ACCX_HIDDEN, ARRAY_implements, BOUND_EXTENDS, BOUND_NARROW, BOUND_NONE, BOUND_SUPER, ELEM_ANNOTATION, ELEM_base, ELEM_CLASS, ELEM_COMPONENT, ELEM_EXPRESSION, ELEM_FIELD, ELEM_FILE, ELEM_IMPORT, ELEM_invalid, ELEM_LOCAL_VARIABLE, ELEM_max, ELEM_METHOD, ELEM_NOTHING, ELEM_PACKAGE, ELEM_SELF_VARIABLE, ELEM_STATEMENT_LABEL, ELEM_TMP_VARIABLE, ELEM_TYPE_VARIABLE, ELEM_WILDCARD_TYPE, ELEM_words, EMPTY_OBJECT_ARRAY, EMPTY_STRING_ARRAY, FOR_ENHANCED, FOR_EXPRESSION, FOR_VARIABLE_D, kEmptyCollection, opt2srcTable, PACKAGE_INFO, PRIMITIVE_autoboxes, PRIMITIVE_binary, PRIMITIVE_BOOLEAN, PRIMITIVE_BYTE, PRIMITIVE_CHAR, PRIMITIVE_descriptors, PRIMITIVE_DOUBLE, PRIMITIVE_FLOAT, PRIMITIVE_INT, PRIMITIVE_invalid, PRIMITIVE_LONG, PRIMITIVE_max, PRIMITIVE_NULL, PRIMITIVE_SHORT, PRIMITIVE_tokens, PRIMITIVE_unary, PRIMITIVE_VOID, SRC_ANNOTATION, SRC_base, SRC_BLOCK, SRC_CLASS, SRC_CLASS_BODY, SRC_CLASS_INITIALIZER, SRC_CONSTRUCTOR_D, SRC_DOC_base, SRC_DOC_BLOCK_TAG, SRC_DOC_COMMENT, SRC_DOC_DESCRIPTION, SRC_DOC_INLINE_TAG, SRC_DOC_max, SRC_DOC_REFERENCE, SRC_DOC_TAG_NAME, SRC_DOC_TEXT, SRC_ENUM_CONSTANT_D, SRC_ERROR, SRC_EXPR_ANNOTATION, SRC_EXPR_ARRAY_ACCESS, SRC_EXPR_ASSIGNMENT, SRC_EXPR_base, SRC_EXPR_DOT, SRC_EXPR_INFIX, SRC_EXPR_LIST, SRC_EXPR_LITERAL, SRC_EXPR_max, SRC_EXPR_METHOD_CALL, SRC_EXPR_NEW_ARRAY, SRC_EXPR_NEW_CLASS, SRC_EXPR_QUESTION, SRC_EXPR_SIMPLE_NAME, SRC_EXPR_TYPE, SRC_EXPR_TYPECAST, SRC_EXPR_UNARY, SRC_EXPR_WRAPPER, SRC_FIELD_D, SRC_FIELD_VARIABLE, SRC_FILE, SRC_FORMAL_PARAMETER, SRC_FORMAL_PARAMETER_LIST, SRC_IMPORT_D, SRC_INTERFACES_CLAUSE, SRC_invalid, SRC_LABEL, SRC_LEX_base, SRC_LEX_BLANKLINE, SRC_LEX_COMMENT, SRC_LEX_max, SRC_LEX_SQLJ, SRC_LOCAL_VARIABLE, SRC_LOCAL_VARIABLE_D, SRC_max, SRC_METHOD_D, SRC_NAME, SRC_PACKAGE_D, SRC_STMT_ASSERT, SRC_STMT_base, SRC_STMT_BLOCK, SRC_STMT_BREAK, SRC_STMT_CATCH, SRC_STMT_CONTINUE, SRC_STMT_DO, SRC_STMT_ELSE, SRC_STMT_EMPTY, SRC_STMT_EXPRESSION, SRC_STMT_FINALLY, SRC_STMT_FOR, SRC_STMT_IF, SRC_STMT_max, SRC_STMT_RETURN, SRC_STMT_SWITCH, SRC_STMT_SYNCH, SRC_STMT_THROW, SRC_STMT_TRY, SRC_STMT_WHILE, SRC_SUPERCLASS_CLAUSE, SRC_SWITCH_LABEL, SRC_THROWS_CLAUSE, SRC_TYPE_ARGUMENT, SRC_TYPE_PARAMETER, SRC_TYPE_REF, SRC_words, TY_ANNOTATE, TY_CLASS, TY_ENUM, TY_INTERFACE, TY_invalid, TY_max, TY_words
 
Fields inherited from interface oracle.javatools.parser.java.v2.JavaErrors
ERROR_ABSTRACT_CLASS, ERROR_AMBIGUOUS_IMPORT, ERROR_AMBIGUOUS_REF, ERROR_ASSERT_IDENTIFIER, ERROR_base, ERROR_CANCELLED, ERROR_CANT_ASSIGN, ERROR_CANT_EXTEND_ENUM, ERROR_CANT_EXTEND_FINAL, ERROR_CANT_EXTEND_INTERFACE, ERROR_CANT_IMPLEMENT_CLASS, ERROR_CANT_TYPECAST, ERROR_CATEGORY_ALL, ERROR_CATEGORY_COMPILE, ERROR_CATEGORY_PARSE, ERROR_CATEGORY_SCAN, ERROR_CATEGORY_unclassified, ERROR_CHECK_EXCEPTION, ERROR_CLASS_CIRCULARITY, ERROR_COMPILE_base, ERROR_COMPILE_GENERIC, ERROR_COMPILE_max, ERROR_CONSTRUCTOR_NAME, ERROR_DUPLICATE, ERROR_EMPTY_CHAR_LITERAL, ERROR_EMPTY_EXPRESSION, ERROR_EXPECTING_ONE, ERROR_EXPECTING_TWO, ERROR_EXTENDS_NOT_ALLOWED, ERROR_EXTENDS_TOO_MANY, ERROR_FORWARD_REFERENCE, ERROR_ILLEGAL_ANNOTATION, ERROR_ILLEGAL_DEFAULT, ERROR_ILLEGAL_LABEL, ERROR_ILLEGAL_START_OF_EXPR, ERROR_ILLEGAL_TYPE_PARAMETERS, ERROR_ILLEGAL_VARARGS, ERROR_IMPLEMENTS_NOT_ALLOWED, ERROR_IMPORT_NOT_FOUND, ERROR_INTERNAL, ERROR_INVALID_CHAR_LITERAL, ERROR_INVALID_ESCAPE_SEQUENCE, ERROR_INVALID_EXPR_STMT, ERROR_INVALID_NAME, ERROR_INVALID_OPERATION, ERROR_INVALID_SUPERTYPE, ERROR_keys, ERROR_LONE_CATCH, ERROR_LONE_ELSE, ERROR_LONE_FINALLY, ERROR_LONE_TRY, ERROR_max, ERROR_MEMBER_NOT_FOUND, ERROR_METHOD_NOT_FOUND, ERROR_MISSING_CONDITION, ERROR_MISSING_METHOD_BODY, ERROR_MODIFIER_REPEATED, ERROR_MULTIPLE_COMPONENTS, ERROR_NAME_NOT_FOUND, ERROR_none, ERROR_NOT_ACCESSIBLE, ERROR_NOT_ANNOTATION_TYPE, ERROR_NOT_ASSIGNABLE, ERROR_NOT_GENERIC_TYPE, ERROR_NOT_IMPLEMENTED_YET, ERROR_NOT_THROWABLE, ERROR_NUMBER_FORMAT, ERROR_NUMERIC_OVERFLOW, ERROR_NUMERIC_UNDERFLOW, ERROR_ONLY_STATIC_ACCESS, ERROR_PARSE_base, ERROR_PARSE_GENERIC, ERROR_PARSE_max, ERROR_REQUIRE_ARRAY, ERROR_REQUIRE_BLOCK, ERROR_REQUIRE_FINAL, ERROR_REQUIRE_OBJECT, ERROR_REQUIRE_OUTER_CLASS, ERROR_SCAN_base, ERROR_SCAN_GENERIC, ERROR_SCAN_max, ERROR_TYPE_ARGUMENT_MISMATCH, ERROR_TYPE_NOT_ALLOWED, ERROR_TYPE_NOT_FOUND, ERROR_UNEXPECTED, ERROR_UNKNOWN, ERROR_VOID_RETURN, ERROR_warnings, ERROR_words, SEVERITY_ERROR, SEVERITY_FATAL, SEVERITY_LINT, SEVERITY_WARNING, SEVERITY_ZERO, WARNING_AMBIGUOUS_DOC_REFERENCE, WARNING_ASSERT_IDENTIFIER, WARNING_DOC_REFERENCE_NOT_FOUND, WARNING_IMPORT_UNUSED, WARNING_INVALID_NAME, WARNING_METHOD_NAME
 
Fields inherited from interface oracle.javatools.parser.java.v2.JavaOperators
OPT_ADD, OPT_ADDASG, OPT_AND, OPT_ANNOTATION, OPT_ARRAYCONST, OPT_ASG, OPT_base, OPT_BITAND, OPT_BITANDASG, OPT_BITNOT, OPT_BITOR, OPT_BITORASG, OPT_BITXOR, OPT_BITXORASG, OPT_CLASS_LITERAL, OPT_COND, OPT_DEREF, OPT_DIV, OPT_DIVASG, OPT_DOT, OPT_EQ, OPT_GE, OPT_GT, OPT_INSTANCEOF, OPT_invalid, OPT_INVOKE, OPT_LE, OPT_LIST, OPT_LITERAL, OPT_LSH, OPT_LSHASG, OPT_LT, OPT_max, OPT_MINUS, OPT_MINUSASG, OPT_MOD, OPT_MODASG, OPT_MUL, OPT_MULASG, OPT_NEGATIVE, OPT_NESTEXP, OPT_NEWARRAY, OPT_NEWOBJECT, OPT_NOT, OPT_NOTEQ, OPT_OR, OPT_POSITIVE, OPT_POSTDEC, OPT_POSTINC, OPT_precedence, OPT_PREDEC, OPT_PREINC, OPT_QUALIFIED_SUPER, OPT_QUALIFIED_THIS, OPT_RSH, OPT_RSHASG, OPT_SIMPLE_NAME, OPT_tokens, OPT_TYPE, OPT_TYPECAST, OPT_URSH, OPT_URSHASG, OPT_words
 
Fields inherited from interface oracle.javatools.parser.java.v2.JavaTokens
DW_values, DW_words, J2SE_13, J2SE_14, J2SE_15, J2SE_16, KW_ABSTRACT, KW_ASSERT, KW_base, KW_BOOLEAN, KW_BREAK, KW_BYTE, KW_CASE, KW_CATCH, KW_CHAR, KW_CLASS, KW_CONST, KW_CONTINUE, KW_DEFAULT, KW_DO, KW_DOUBLE, KW_ELSE, KW_ENUM, KW_EXTENDS, KW_FINAL, KW_FINALLY, KW_FLOAT, KW_FOR, KW_GOTO, KW_IF, KW_IMPLEMENTS, KW_IMPORT, KW_INSTANCEOF, KW_INT, KW_INTERFACE, KW_j2se13_max, KW_j2se14_max, KW_j2se15_max, KW_j2se16_max, KW_LONG, KW_max, KW_NATIVE, KW_NEW, KW_PACKAGE, KW_PRIVATE, KW_PROTECTED, KW_PUBLIC, KW_RETURN, KW_SHORT, KW_STATIC, KW_STRICTFP, KW_SUPER, KW_SWITCH, KW_SYNCHRONIZED, KW_THIS, KW_THROW, KW_THROWS, KW_TRANSIENT, KW_TRY, KW_VOID, KW_VOLATILE, KW_WHILE, KW_words, OP_AND_ASG, OP_ASG, OP_AT, OP_base, OP_BINAND, OP_binary, OP_BINNOT, OP_BINOR, OP_BINXOR, OP_COLON, OP_COMMA, OP_DEC, OP_DIV, OP_DIV_ASG, OP_DOT, OP_ELLIPSIS, OP_EQ, OP_GE, OP_GT, OP_HASH, OP_INC, OP_LBRACE, OP_LBRACKET, OP_LE, OP_LOGAND, OP_LOGNOT, OP_LOGOR, OP_LPAREN, OP_LSH, OP_LSH_ASG, OP_LT, OP_max, OP_MINUS, OP_MINUS_ASG, OP_MOD, OP_MOD_ASG, OP_MUL, OP_MUL_ASG, OP_NE, OP_OR_ASG, OP_PLUS, OP_PLUS_ASG, OP_prefix, OP_QUES, OP_RBRACE, OP_RBRACKET, OP_RPAREN, OP_RSH, OP_RSH_ASG, OP_SEMI, OP_URSH, OP_URSH_ASG, OP_words, OP_XOR_ASG, TK_BOOLEAN_LITERAL, TK_CHAR_LITERAL, TK_DOC_COMMENT, TK_DOUBLE_LITERAL, TK_EOF, TK_FLOAT_LITERAL, TK_IDENTIFIER, TK_INT_LITERAL, TK_LITERAL_base, TK_LITERAL_max, TK_LONG_LITERAL, TK_max, TK_MULTI_COMMENT, TK_NULL_LITERAL, TK_SINGLE_COMMENT, TK_SQLJ, TK_STRING_LITERAL, TK_WHITESPACE
 
Fields inherited from interface oracle.javatools.parser.java.v2.JavaPreferences
BLANKLINES_AFTER_LAST_MEMBER, BLANKLINES_BEFORE_DOC_COMMENT, BLANKLINES_BEFORE_FIELD, BLANKLINES_BEFORE_FIRST_CLASS, BLANKLINES_BEFORE_FIRST_MEMBER, BLANKLINES_BEFORE_MEMBER_CLASS, BLANKLINES_BEFORE_METHOD, BLANKLINES_EMPTY_ANONYMOUS, BLANKLINES_EMPTY_BLOCK, BLANKLINES_EMPTY_CLASS, BLANKLINES_EMPTY_METHOD, BLANKLINES_IMPORTS_AFTER, BLANKLINES_PACKAGE_AFTER, BLANKLINES_PRESERVE_COUNT, CLONE_QUALIFIES_TYPES, FALSE, IGNORED_I, IGNORED_Z, IMPORT_GROUP_IMPORTS, IMPORT_GROUP_PACKAGE_DEPTH, IMPORT_INNER_CLASS_NAME, IMPORT_NARROW_MEMBERS_THRESHOLD, IMPORT_NARROW_THRESHOLD, INDENT_BLOCK_CHILDREN, INDENT_CLASS_MEMBERS, INDENT_CONTROL_BLOCKS, INDENT_NUM_SPACES, INDENT_REPLACE_WITH_TABS, INDENT_SWITCH_CASES, INDENT_TAB_SIZE, INTEGER_ALWAYS_WRAP, INTEGER_NEVER_WRAP, INTEGER_WRAP_IF_LONG, MEMBER_ORDER, NEWLINE_AFTER_SWITCH_CASE, NEWLINE_ARRAY_BRACES, NEWLINE_BLOCK_BRACES, NEWLINE_CATCH, NEWLINE_CLASS_BRACES, NEWLINE_ELSE, NEWLINE_EXTENDS, NEWLINE_FINALLY, NEWLINE_IMPLEMENTS, NEWLINE_METHOD_BRACES, NEWLINE_THROWS, NEWLINE_WHILE, ONE, PREFERENCES_base, PREFERENCES_defaults, PREFERENCES_keys, PREFERENCES_max, PREFERENCES_sun, SPACE_ARGUMENTS_BEFORE, SPACE_ASSIGN_AROUND, SPACE_BINARYOP_AROUND, SPACE_BRACES_AROUND, SPACE_BRACKETS_WITHIN, SPACE_COLON_AFTER, SPACE_COLON_BEFORE, SPACE_COMMA_AFTER, SPACE_COMMA_BEFORE, SPACE_KEYWORD_AFTER, SPACE_OPENBRACE_BEFORE, SPACE_PARAMETERS_BEFORE, SPACE_PARENS_WITHIN, SPACE_QUESTION_AFTER, SPACE_QUESTION_BEFORE, SPACE_SEMICOLON_AFTER, SPACE_SEMICOLON_BEFORE, SPACE_TYPECAST_AFTER, TRI_ALWAYS_WRAP, TRI_NEVER_WRAP, TRI_WRAP_IF_LONG, TRUE, TWO, UNKNOWN_I, UNKNOWN_Z, WRAP_ALIGN, WRAP_ARRAY_CONSTANT, WRAP_BINARY_OPERATOR, WRAP_DOT_CHAIN, WRAP_EXTENDS, WRAP_FOR_STATEMENT, WRAP_INVOKE_ARGUMENTS, WRAP_LINE_WIDTH, WRAP_MODIFIERS, WRAP_PARAMETER_LIST, WRAP_QUES_OPERATOR, WRAP_THROWS, ZERO
 
Constructor Summary
AbstractMethod()
           
 
Method Summary
 void clearCompiledInfo()
          Overrides should chain.
 boolean equals(java.lang.Object o)
           
 java.lang.Object getDefaultValue()
           
 java.lang.String getDescriptor()
          Important: This is not the same as getReturnType().getDescriptor() which is synonymous with getReturnType().getDescriptor().
 int getElementKind()
           
 java.util.Collection getExceptions()
           
 JavaFile getFile()
           
 JavaMethod getMethodErasure()
          Gets the erasure for this method.
abstract  int getModifiers()
           
abstract  java.lang.String getName()
           
 java.util.Collection getOverriddenMethods()
          According to the JLS, implementing methods are overriding methods where the overriden method is abstract.
 JavaElement getOwner()
          TODO: Document me!
abstract  JavaClass getOwningClass()
           
 java.util.Collection getParameters()
           
 JavaType[] getParameterTypes()
           
abstract  JavaType getResolvedType()
          A JavaField instance will return the field's type.
 JavaType getReturnType()
          All constructors have a return type of "void".
 java.lang.String getSignature()
          Important: This is not the same as getReturnType().getSignature() which is synonymous with getReturnType().getSignature().
 JavaTypeVariable getTypeParameter(java.lang.String name)
           
 java.lang.String getTypeSignature()
          Not a JVMS term.
 java.lang.String getUniqueIdentifier()
          Gets the unique identifier for this declaration.
 int hashCode()
           
 boolean hasSubsignatureOf(JavaMethod other)
          True if this method's signature is a subsignature of the other method's signature.
 boolean isConstructor()
           
 boolean isNative()
           
 java.lang.String printCompiledInfo()
          Debugging function for printing out compiled information.
 
Methods inherited from class oracle.javatools.parser.java.v2.common.AbstractElement
getActualTypeArguments, getAnnotation, getAnnotations, getDeclaredAnnotation, getDeclaredAnnotations, getSourceElement, getSourceSymbol, getTypeParameters, getUnresolvedType, hasActualTypeArguments, hasTypeParameters, isAbstract, isDeprecated, isFinal, isHidden, isPackagePrivate, isPrivate, isProtected, isPublic, isSourceElement, isStatic, isSynthetic, isTransient, isVarargs
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaMethod
isVarargs
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaIsGeneric
getActualTypeArguments, getTypeParameters, hasActualTypeArguments, hasTypeParameters
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaMember
isAbstract, isPackagePrivate, isPrivate, isProtected, isPublic, isStatic
 
Methods inherited from interface oracle.javatools.parser.java.v2.model.JavaHasType
getUnresolvedType
 
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
getSourceElement, isDeprecated, isFinal, isHidden, isSourceElement, isSynthetic
 

Constructor Detail

AbstractMethod

public AbstractMethod()
Method Detail

getModifiers

public abstract int getModifiers()
Specified by:
getModifiers in interface JavaElement
Specified by:
getModifiers in class AbstractElement
Returns:
The access modifiers on this element.

getOwningClass

public abstract JavaClass getOwningClass()
Specified by:
getOwningClass in interface JavaMember
Returns:
The owning class. If this is an instance of a generic field, then this will return an instance of the owning class as well. For example, consider:
class C<E>
{
E field;

{
C generic = new C();
generic.field = null;

C<String> specific = new C<String>();
specific.field = null;
}
}

If this instance represents the member field accessed by "generic.field", then getOwningClass will return the type for "C".

If this instance represents the member field accessed by "specific.field", then getOwningClass will return the type for "C<String>".

Further, the expressions "generic.field" and "specific.field" do not refer to the same JavaField instance.


getName

public abstract java.lang.String getName()
Specified by:
getName in interface JavaHasName
Returns:
The short (simple) name of this compiled object.

getResolvedType

public abstract JavaType getResolvedType()
Description copied from interface: JavaHasType
A JavaField instance will return the field's type.

A JavaMethod instance will return the method's return type.

A JavaVariable instance will return the variable's type.

A JavaType instance will return itself.

Specified by:
getResolvedType in interface JavaHasType
Returns:
The type of this compiled object.

getTypeParameter

public JavaTypeVariable getTypeParameter(java.lang.String name)
Specified by:
getTypeParameter in interface JavaIsGeneric
Returns:
The matching type parameter. Null means no match.

getMethodErasure

public JavaMethod getMethodErasure()
Description copied from interface: JavaMethod
Gets the erasure for this method. Here, we define method erasure as the result when all parameterized information is erased. Contrast with type erasure where both generic and parameterized information is erased.

The erasure of a method that is not at all generic is trivially itself. The erasure of a method that is completely unparameterized method is also trivially itself.

Note: Erasure is performed strictly on this method and its owning type and is not performed on any of the contained types. For example, consider the method List<String>.get(int) which has a String return type. The parameterization is from List's E type parameter to String. Erasing the parameterization leaves us with List.get(int) which returns has a E return type.

Specified by:
getMethodErasure in interface JavaMethod
Returns:
The JavaMethod for this method's erasure.

getFile

public JavaFile getFile()
Specified by:
getFile in interface JavaElement
Returns:
Returns the JavaFile that this element is contained in.

If a SourceFile is returned, then this element is declared in or otherwise comes in a SourceFile.

A non-null JavaFile may be returned that is not a SourceFile. For example, a JavaClass that came from a .class file definition will return such a JavaFile instance.

If null, then this element was created on-the-fly.


getElementKind

public int getElementKind()
Specified by:
getElementKind in interface JavaElement
Specified by:
getElementKind in class AbstractElement
Returns:
The type of JavaElement this is. Valid values are JavaConstants.ELEM_*.

isConstructor

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

isNative

public boolean isNative()
Specified by:
isNative in interface JavaMethod
Returns:
True if this method has been marked as native.

getOwner

public JavaElement getOwner()
Description copied from interface: JavaElement
TODO: Document me!

Specified by:
getOwner in interface JavaElement
Specified by:
getOwner in class AbstractElement

getReturnType

public JavaType getReturnType()
Description copied from interface: JavaMethod
All constructors have a return type of "void".

Specified by:
getReturnType in interface JavaMethod
Returns:
The return type.

getParameters

public java.util.Collection getParameters()
Specified by:
getParameters in interface JavaMethod
Returns:
The array of formal parameters, including the implicit "this$0" parameter if applicable. Returns a collection of JavaVariable's. Note, the "this$0" parameter will be a CompiledTmpVariable which is not compatible with JavaLocalVariable.

getParameterTypes

public JavaType[] getParameterTypes()
Specified by:
getParameterTypes in interface JavaMethod
Returns:
The array of types for the formal parameters, including the implicit "this$0" parameter if applicable. The array is populated with the result of calling getResolvedType() on each parameter returned by getParameters(). Parameter types that fail to resolve will show up as null values in the array.

getExceptions

public java.util.Collection getExceptions()
Specified by:
getExceptions in interface JavaMethod
Returns:
The array of checked exceptions. Oddly enough, this includes RuntimeExceptions which, as you know, are ignored by the compiler. (This matches the behavior of java/lang/reflect/Method.) Returns a collection of JavaType's.

getDefaultValue

public java.lang.Object getDefaultValue()
Specified by:
getDefaultValue in interface JavaMethod
Returns:
The default value, if any. Applies only to annotation components.
See Also:
JavaVariable.getConstantValue()

getDescriptor

public java.lang.String getDescriptor()
Description copied from interface: JavaMethod
Important: This is not the same as getReturnType().getDescriptor() which is synonymous with getReturnType().getDescriptor(). This returns the method's pre-jdk-1.5 descriptor.

Specified by:
getDescriptor in interface JavaMethod

getTypeSignature

public java.lang.String getTypeSignature()
Description copied from interface: JavaMethod
Not a JVMS term. Start with the MethodSignature. If there are any actual type arguments, then the type signature of those type arguments (similar to ClassTypeSignature) is appended to the result. Uniquely identifies a method's signature.

Specified by:
getTypeSignature in interface JavaMethod

getSignature

public java.lang.String getSignature()
Description copied from interface: JavaMethod
Important: This is not the same as getReturnType().getSignature() which is synonymous with getReturnType().getSignature(). This returns the method's jdk-1.5 signature.

Specified by:
getSignature in interface JavaMethod

getUniqueIdentifier

public java.lang.String getUniqueIdentifier()
Description copied from interface: JavaMember
Gets the unique identifier for this declaration. Two members are equal iff their unique identifiers are equal.

Specified by:
getUniqueIdentifier in interface JavaMember
Returns:
The unique identifier.

printCompiledInfo

public java.lang.String printCompiledInfo()
Description copied from interface: JavaElement
Debugging function for printing out compiled information.

Specified by:
printCompiledInfo in interface JavaElement
Overrides:
printCompiledInfo in class AbstractElement

hasSubsignatureOf

public boolean hasSubsignatureOf(JavaMethod other)
Description copied from interface: JavaMethod
True if this method's signature is a subsignature of the other method's signature. For shorthand, we say that "this" method has a subsignature of the "other" method.

Specified by:
hasSubsignatureOf in interface JavaMethod

getOverriddenMethods

public java.util.Collection getOverriddenMethods()
Description copied from interface: JavaMethod
According to the JLS, implementing methods are overriding methods where the overriden method is abstract. Order is depth-first, classes before interfaces, left-to-right.

Specified by:
getOverriddenMethods in interface JavaMethod
Returns:
The array of methods overriden by this one.

equals

public boolean equals(java.lang.Object o)
Specified by:
equals in interface JavaMethod
Overrides:
equals in class java.lang.Object
Returns:
True if o is a JavaMethod and has the same owning class, name, and signature as this method.

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

clearCompiledInfo

public void clearCompiledInfo()
Description copied from class: AbstractElement
Overrides should chain.

Overrides:
clearCompiledInfo in class AbstractElement

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

E13403-03

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