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

FieldElement (NetBeans Java Hierarchy API) - NetBeans API Javadoc 5.5.1

org.openide.src 1.8.31

org.openide.src
Class FieldElement

java.lang.Object
  extended by org.openide.src.Element
      extended by org.openide.src.MemberElement
          extended by org.openide.src.FieldElement
All Implemented Interfaces:
Serializable, Cloneable, Node.Cookie, ElementProperties

public final class FieldElement
extends MemberElement

Describes a field (variable) in a class.

See Also:
Serialized Form

Nested Class Summary
static interface FieldElement.Impl
          Implementation of a field element.
 
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
FieldElement()
          Create a new field element represented in memory.
FieldElement(FieldElement.Impl impl, ClassElement declaringClass)
          Create a new field element.
 
Method Summary
 Object clone()
          Clone the field element.
 String getInitValue()
          Get the initial value of the field.
 JavaDoc.Field getJavaDoc()
          Get the JavaDoc for the field.
 int getModifiersMask()
          Get the permitted modifiers for this type of element.
 Type getType()
          Get the value type of the field.
 void print(ElementPrinter printer)
          Print this element (and all its subelements) into an element printer.
 void setInitValue(String value)
          Set the initial value of the field.
 void setName(Identifier name)
          Set the name of this member.
 void setType(Type type)
          Set the value type of the field.
 
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

FieldElement

public FieldElement()
Create a new field element represented in memory.


FieldElement

public FieldElement(FieldElement.Impl impl,
                    ClassElement declaringClass)
Create a new field element.

Parameters:
impl - the pluggable implementation
declaringClass - declaring class of this field, or null
Method Detail

clone

public Object clone()
Clone the field element.

Overrides:
clone in class MemberElement
Returns:
a new element that has the same values as the original but is represented in memory

getType

public Type getType()
Get the value type of the field.

Returns:
the type

setType

public void setType(Type type)
             throws SourceException
Set the value type of the field.

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

getInitValue

public String getInitValue()
Get the initial value of the field.

Returns:
the initial value (as source text), or an empty string if uninitialized

setInitValue

public void setInitValue(String value)
                  throws SourceException
Set the initial value of the field.

Parameters:
value - the initial value (as source text), or an empty string if uninitialized
Throws:
SourceException - if impossible

getModifiersMask

public int getModifiersMask()
Description copied from class: MemberElement
Get the permitted modifiers for this type of element.

Specified by:
getModifiersMask in class MemberElement
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

getJavaDoc

public JavaDoc.Field getJavaDoc()
Get the JavaDoc for the field.

Returns:
the JavaDoc

print

public void print(ElementPrinter printer)
           throws ElementPrinterInterruptException
Description copied from class: Element
Print this element (and all its subelements) into an element printer.

Specified by:
print in class Element
Parameters:
printer - the element printer
Throws:
ElementPrinterInterruptException - if the printer canceled the printing

org.openide.src 1.8.31

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