Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.src 1.8.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## 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:
  Serializable, Cloneable, Node.Cookie, ElementProperties

    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

Nested 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.

Nested classes/interfaces inherited from class org.openide.src.Element
`Element.Impl2`

Field Summary

Fields inherited from class org.openide.src.Element
`impl, impl2`

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`

Constructor Summary
`MethodElement()` Create a method element held in memory.
`MethodElement(MethodElement.Impl impl, ClassElement clazz)` Create a method element.

Method Summary
`Object` | `clone()` Clone the method.
`int` | `getModifiersMask()` Get the permitted modifiers for this type of element.
`Type` | `getReturn()` Get the method's return type.
`void` | `setName(Identifier name)` Set the name of this member.
`void` | `setReturn(Type ret)` Set the method's return type.

Methods inherited from class org.openide.src.ConstructorElement
`getBody, getExceptions, getJavaDoc, getParameters, print, setBody, setExceptions, setParameters`

Methods inherited from class org.openide.src.MemberElement
`getDeclaringClass, getModifiers, getName, setModifiers`

Methods inherited from class org.openide.src.Element
`addPropertyChangeListener, addVetoableChangeListener, getCookie, markCurrent, removePropertyChangeListener, removeVetoableChangeListener, toString, writeReplace`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Constructor Detail

### 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 functionality
    `clazz` - declaring class, or `null`

Method Detail

### 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:
    `ret` - 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`
  Returns:
    disjunction of constants from `java.lang.reflect.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

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| org.openide.src 1.8.22
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Built on December 7 2006. | Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.