org.openide.src
Interface ClassElement.Impl

All Superinterfaces:
Element.Impl, MemberElement.Impl, Serializable
Enclosing interface:
ClassElement

public static interface ClassElement.Impl
extends MemberElement.Impl

Pluggable behavior for class elements.

See Also:
ClassElement

Field Summary
static int ADD
          Add some items.
static int REMOVE
          Remove some items.
static long serialVersionUID
          Deprecated. Only public by accident.
static int SET
          Set some items, replacing the old ones.
 
Method Summary
 void changeClasses(ClassElement[] elems, int action)
          Change the set of inner classes.
 void changeConstructors(ConstructorElement[] elems, int action)
          Change the set of constructors.
 void changeFields(FieldElement[] elems, int action)
          Change the set of fields.
 void changeInitializers(InitializerElement[] elems, int action)
          Change the set of initializers.
 void changeInterfaces(Identifier[] ids, int action)
          Change the set of implemented/extended interfaces.
 void changeMethods(MethodElement[] elems, int action)
          Change the set of methods.
 ClassElement getClass(Identifier name)
          Find an inner class by name.
 ClassElement[] getClasses()
          Get all inner classes.
 ConstructorElement getConstructor(Type[] arguments)
          Find a constructor by signature.
 ConstructorElement[] getConstructors()
          Get all constructors.
 FieldElement getField(Identifier name)
          Find a field by name.
 FieldElement[] getFields()
          Get all fields.
 InitializerElement[] getInitializers()
          Get all initializers.
 Identifier[] getInterfaces()
          Get all implemented/extended interfaces.
 JavaDoc.Class getJavaDoc()
          Get the class's documentation block.
 MethodElement getMethod(Identifier name, Type[] arguments)
          Finds a method by signature.
 MethodElement[] getMethods()
          Get all methods.
 Identifier getSuperclass()
          Get the superclass for this class.
 boolean isClassOrInterface()
          Test whether this is a class or interface.
 void setClassOrInterface(boolean isClass)
          Set whether this is a class or interface.
 void setSuperclass(Identifier superClass)
          Set the superclass for this class.
 
Methods inherited from interface org.openide.src.MemberElement.Impl
getModifiers, getName, setModifiers, setName
 
Methods inherited from interface org.openide.src.Element.Impl
addPropertyChangeListener, attachedToElement, getCookie, markCurrent, readResolve, removePropertyChangeListener
 

Field Detail

ADD

public static final int ADD
Add some items.

See Also:
Constant Field Values

REMOVE

public static final int REMOVE
Remove some items.

See Also:
Constant Field Values

SET

public static final int SET
Set some items, replacing the old ones.

See Also:
Constant Field Values

serialVersionUID

public static final long serialVersionUID
Deprecated. Only public by accident.

See Also:
Constant Field Values
Method Detail

setSuperclass

public void setSuperclass(Identifier superClass)
                   throws SourceException
Set the superclass for this class.

Parameters:
superClass - the superclass, by name
Throws:
SourceException - if impossible

getSuperclass

public Identifier getSuperclass()
Get the superclass for this class.

Returns:
the superclass, by name

setClassOrInterface

public void setClassOrInterface(boolean isClass)
                         throws SourceException
Set whether this is a class or interface.

Parameters:
isClass - either ClassElement.CLASS or ClassElement.INTERFACE
Throws:
SourceException - if impossible

isClassOrInterface

public boolean isClassOrInterface()
Test whether this is a class or interface.

Returns:
either ClassElement.CLASS or ClassElement.INTERFACE

changeInitializers

public void changeInitializers(InitializerElement[] elems,
                               int action)
                        throws SourceException
Change the set of initializers.

Parameters:
elems - the new initializers
action - ADD, REMOVE, or SET
Throws:
SourceException - if impossible

getInitializers

public InitializerElement[] getInitializers()
Get all initializers.

Returns:
the initializers

changeFields

public void changeFields(FieldElement[] elems,
                         int action)
                  throws SourceException
Change the set of fields.

Parameters:
elems - the new fields
action - ADD, REMOVE, or SET
Throws:
SourceException - if impossible

getFields

public FieldElement[] getFields()
Get all fields.

Returns:
the fields

getField

public FieldElement getField(Identifier name)
Find a field by name.

Parameters:
name - the name to look for
Returns:
the field, or null if it does not exist

changeMethods

public void changeMethods(MethodElement[] elems,
                          int action)
                   throws SourceException
Change the set of methods.

Parameters:
elems - the new methods
action - ADD, REMOVE, or SET
Throws:
SourceException - if impossible

getMethods

public MethodElement[] getMethods()
Get all methods.

Returns:
the methods

getMethod

public MethodElement getMethod(Identifier name,
                               Type[] arguments)
Finds a method by signature.

Parameters:
name - the name to look for
arguments - the argument types to look for
Returns:
the method, or null if it does not exist

changeConstructors

public void changeConstructors(ConstructorElement[] elems,
                               int action)
                        throws SourceException
Change the set of constructors.

Parameters:
elems - the new constructors
action - ADD, REMOVE, or SET
Throws:
SourceException - if impossible

getConstructors

public ConstructorElement[] getConstructors()
Get all constructors.

Returns:
the constructors

getConstructor

public ConstructorElement getConstructor(Type[] arguments)
Find a constructor by signature.

Parameters:
arguments - the argument types to look for
Returns:
the constructor, or null if it does not exist

changeClasses

public void changeClasses(ClassElement[] elems,
                          int action)
                   throws SourceException
Change the set of inner classes.

Parameters:
elems - the new inner classes
action - ADD, REMOVE, or SET
Throws:
SourceException - if impossible

getClasses

public ClassElement[] getClasses()
Get all inner classes.

Returns:
the inner classes

getClass

public ClassElement getClass(Identifier name)
Find an inner class by name.

Parameters:
name - the name to look for
Returns:
the inner class, or null if it does not exist

changeInterfaces

public void changeInterfaces(Identifier[] ids,
                             int action)
                      throws SourceException
Change the set of implemented/extended interfaces.

Parameters:
ids - the new interfaces, by name
action - ADD, REMOVE, or SET
Throws:
SourceException - if impossible

getInterfaces

public Identifier[] getInterfaces()
Get all implemented/extended interfaces.

Returns:
the interfaces, by name

getJavaDoc

public JavaDoc.Class getJavaDoc()
Get the class's documentation block.

Returns:
JavaDoc for the class (not its members)

 

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