org.openide.src
Class MemberElement
java.lang.Object
|
+--org.openide.src.Element
|
+--org.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
Inner Class Summary |
static interface |
MemberElement.Impl
Pluggable implementation of member elements. |
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 |
MemberElement
protected MemberElement(MemberElement.Impl impl,
ClassElement declaringClass)
- Create a member element.
- Parameters:
impl
- the pluggable implementationdeclaringClass
- the class this element belongs to, or null
if unattached
getModifiers
public final int getModifiers()
- Get the modifier flags for this element.
Constrained by
getModifiersMask()
.
- Returns:
- disjunction of constants from
Modifier
setModifiers
public final void setModifiers(int mod)
throws SourceException
- Set the modifier flags for this element.
- Parameters:
mod
- disjunction of constants from 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
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
- Overrides:
clone
in class Object
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 December 12 2001. | Portions Copyright 1997-2001 Sun Microsystems, Inc. All rights reserved.