|
What this is
This file is included in the DevDaily.com
"Java Source Code
Warehouse" project. The intent of this project is to help you "Learn
Java by Example" TM.
Other links
The source code
/*
* Sun Public License Notice
*
* The contents of this file are subject to the Sun Public License
* Version 1.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://www.sun.com/
*
* The Original Code is NetBeans. The Initial Developer of the Original
* Code is Sun Microsystems, Inc. Portions Copyright 1997-2000 Sun
* Microsystems, Inc. All Rights Reserved.
*/
package org.openide.src.nodes;
import java.lang.reflect.Modifier;
/* ? --jglick
* For convenience, implementations of this interface could use
* {@link Modifier} masks.
*/
/** Orders and filters members in a class element node.
* Can be used for methods, fields, inner classes, etc.
* The semantics are very similar to those of SourceElementFilter .
* @see org.openide.src.ClassElement
* @see ClassChildren
*
* @author Dafe Simonek, Jan Jancura
*/
public class ClassElementFilter extends SourceElementFilter {
// [PENDING] should initializers be included? --jglick
/** Specifies a child representing a constructor. */
public static final int CONSTRUCTOR = 8;
/** Specifies a child representing a field (instance variable). */
public static final int FIELD = 16;
/** Specifies a child representing a method. */
public static final int METHOD = 32;
/** Specifies a child representing the superclass of the node's class. */
public static final int EXTENDS = 64;
/** Specifies a child representing an implemented interface of the node's class.
* For a node representing an interface, this would specify an extended interface.
*/
public static final int IMPLEMENTS = 128;
/** Does not specify a child type. */
public static final int ALL = SourceElementFilter.ALL | CONSTRUCTOR | FIELD | METHOD |
EXTENDS | IMPLEMENTS;
/** Default order and filtering.
* Places all fields, constructors, methods, and inner classes (interfaces) together
* in one block.
*/
public static final int[] DEFAULT_ORDER = {FIELD | CONSTRUCTOR | METHOD | CLASS | INTERFACE};
// [PENDING] where is this used? --jglick
/** Specifies a child which is static. */
public static final int STATIC = Modifier.STATIC;
/** stores property value */
private boolean sorted = true;
/** Test whether the elements in one element type group are sorted.
* @return true if groups in getOrder () field are sorted, false
* to default order of elements
*/
public boolean isSorted () {
return sorted;
}
/** Set whether groups of elements returned by getOrder () should be sorted.
* @param sorted true if so
*/
public void setSorted (boolean sorted) {
this.sorted = sorted;
}
}
|