站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > NetBeans API Javadoc 5.0.0

MemberElement (NetBeans Java Hierarchy API) - NetBeans API Javadoc 5.0.0

 

org.openide.src
Class MemberElement

java.lang.Object
  extended byorg.openide.src.Element
      extended byorg.openide.src.MemberElement
All Implemented Interfaces:
Cloneable, ElementProperties, Node.Cookie, Serializable
Direct Known Subclasses:
ClassElement, ConstructorElement, FieldElement

public abstract class MemberElement
extends Element
implements Cloneable

Superclass for containable Java source members (fields, methods and classes). Provides support for associating this element with a declaring class.

See Also:
Serialized Form

Nested Class Summary
static interface MemberElement.Impl
          Pluggable implementation of member elements.
 
Nested classes 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
protected MemberElement(MemberElement.Impl impl, ClassElement declaringClass)
          Create a member element.
 
Method Summary
 Object clone()
           
 ClassElement getDeclaringClass()
          Get the declaring class.
 int getModifiers()
          Get the modifier flags for this element.
abstract  int getModifiersMask()
          Get the permitted modifiers for this type of element.
 Identifier getName()
          Get the name of this member.
 void setModifiers(int mod)
          Set the modifier flags for this element.
 void setName(Identifier name)
          Set the name of this member.
 
Methods inherited from class org.openide.src.Element
addPropertyChangeListener, addVetoableChangeListener, getCookie, markCurrent, print, removePropertyChangeListener, removeVetoableChangeListener, toString, writeReplace
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MemberElement

protected MemberElement(MemberElement.Impl impl,
                        ClassElement declaringClass)
Create a member element.

Parameters:
impl - the pluggable implementation
declaringClass - the class this element belongs to, or null if unattached
Method Detail

getModifiers

public final int getModifiers()
Get the modifier flags for this element. Constrained by getModifiersMask().

Returns:
disjunction of constants from java.lang.reflect.Modifier

setModifiers

public final void setModifiers(int mod)
                        throws SourceException
Set the modifier flags for this element.

Parameters:
mod - disjunction of constants from java.lang.reflect.Modifier
Throws:
SourceException - if impossible (e.g. if mod & ~ getModifiersMask() != 0)

getModifiersMask

public abstract int getModifiersMask()
Get the permitted modifiers for this type of element.

Returns:
disjunction of constants from java.lang.reflect.Modifier

getName

public final Identifier getName()
Get the name of this member.

Returns:
the name

setName

public void setName(Identifier name)
             throws SourceException
Set the name of this member.

Parameters:
name - the name
Throws:
SourceException - if impossible

clone

public Object clone()
             throws CloneNotSupportedException
Throws:
CloneNotSupportedException

getDeclaringClass

public final ClassElement getDeclaringClass()
Get the declaring class.

Returns:
the class that owns this member element, or null if the element is not attached to any class

 

Built on May 3 2007.  |  Portions Copyright 1997-2005 Sun Microsystems, Inc. All rights reserved.