org.openide.src
Class MethodElement
java.lang.Object
|
+--org.openide.src.Element
|
+--org.openide.src.MemberElement
|
+--org.openide.src.ConstructorElement
|
+--org.openide.src.MethodElement
- All Implemented Interfaces:
- Cloneable, ElementProperties, Node.Cookie, Serializable
- public final class MethodElement
- extends ConstructorElement
Representation of a method.
It extends the constructor representation since
all that is added is the return type.
- See Also:
- Serialized Form
Inner Class Summary |
static interface |
MethodElement.Impl
Pluggable behavior of the method element. |
static class |
MethodElement.Key
A key for method elements, for use in hash tables etc. |
Fields inherited from interface org.openide.src.ElementProperties |
PROP_ALL_CLASSES, PROP_BODY, PROP_CLASS_OR_INTERFACE, PROP_CLASSES, PROP_CONSTRUCTORS, PROP_EXCEPTIONS, PROP_FIELDS, PROP_IMPORTS, PROP_INIT_VALUE, PROP_INITIALIZERS, PROP_INTERFACES, PROP_JAVADOC, PROP_MEMBERS, PROP_METHODS, PROP_MODIFIERS, PROP_NAME, PROP_PACKAGE, PROP_PARAMETERS, PROP_RETURN, PROP_STATIC, PROP_STATUS, PROP_SUPERCLASS, PROP_TYPE, PROP_VALID |
MethodElement
public MethodElement()
- Create a method element held in memory.
MethodElement
public MethodElement(MethodElement.Impl impl,
ClassElement clazz)
- Create a method element.
- Parameters:
impl
- implementation of functionalityclazz
- declaring class, or null
clone
public Object clone()
- Clone the method.
- Overrides:
clone
in class ConstructorElement
- Returns:
- new method with the same values as the original,
but represented in memory
getReturn
public Type getReturn()
- Get the method's return type.
- Returns:
- the return type
setReturn
public void setReturn(Type ret)
throws SourceException
- Set the method's return type.
- Parameters:
type
- the new type- Throws:
SourceException
- if impossible
getModifiersMask
public int getModifiersMask()
- Description copied from class:
MemberElement
- Get the permitted modifiers for this type of element.
- Overrides:
getModifiersMask
in class ConstructorElement
- Following copied from class:
org.openide.src.MemberElement
- Returns:
- disjunction of constants from
Modifier
setName
public final void setName(Identifier name)
throws SourceException
- Set the name of this member.
- Overrides:
setName
in class MemberElement
- Parameters:
name
- the name- Throws:
SourceException
- if impossible
Built on December 12 2001. | Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.