org.netbeans.modules.java.api.common/0 1.37

org.netbeans.modules.java.api.common
Class Roots

java.lang.Object
  extended by org.netbeans.modules.java.api.common.Roots
Direct Known Subclasses:
SourceRoots

public abstract class Roots
extends Object

Represents a list of root properties used by QuerySupport.createSources(org.netbeans.api.project.Project, org.netbeans.spi.project.support.ant.AntProjectHelper, org.netbeans.spi.project.support.ant.PropertyEvaluator, org.netbeans.modules.java.api.common.Roots...)

Since:
1.21

Method Summary
 void addPropertyChangeListener(PropertyChangeListener listener)
          Adds PropertyChangeListener, see class description for more information about listening to the source roots changes.
abstract  String[] getRootDisplayNames()
          Returns root's display names
abstract  String[] getRootProperties()
          Returns names of Ant properties in the project.properties file holding the roots.
static Roots nonSourceRoots(String... rootPropNames)
          Creates roots list which should be registered as non source roots.
static Roots propertyBased(String[] properties, String[] displayNames, boolean supportIncludes, String type, String hint)
          Creates a source roots list which should be registered as principal and possibly typed roots.
 void removePropertyChangeListener(PropertyChangeListener listener)
          Removes PropertyChangeListener, see class description for more information about listening to the source roots changes.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getRootDisplayNames

@NonNull
public abstract String[] getRootDisplayNames()
Returns root's display names

Returns:
an array of String

getRootProperties

@NonNull
public abstract String[] getRootProperties()
Returns names of Ant properties in the project.properties file holding the roots.

Returns:
an array of String.

addPropertyChangeListener

public final void addPropertyChangeListener(@NonNull
                                            PropertyChangeListener listener)
Adds PropertyChangeListener, see class description for more information about listening to the source roots changes.

Parameters:
listener - a listener to add.

removePropertyChangeListener

public final void removePropertyChangeListener(@NonNull
                                               PropertyChangeListener listener)
Removes PropertyChangeListener, see class description for more information about listening to the source roots changes.

Parameters:
listener - a listener to remove.

nonSourceRoots

public static Roots nonSourceRoots(@NonNull
                                   String... rootPropNames)
Creates roots list which should be registered as non source roots.

Parameters:
rootPropNames - Ant properties in the project.properties file holding the roots
Returns:
the Roots
See Also:
for details

propertyBased

public static Roots propertyBased(@NonNull
                                  String[] properties,
                                  @NonNull
                                  String[] displayNames,
                                  boolean supportIncludes,
                                  @NullAllowed
                                  String type,
                                  @NullAllowed
                                  String hint)
Creates a source roots list which should be registered as principal and possibly typed roots.

Parameters:
properties - Ant properties in the project.properties file holding the roots
displayNames - the display names of the roots
supportIncludes - when true the roots list supports includes/excludes
type - of the roots, when null the roots are registered as principal roots only
hint - optional hint for SourceGroupModifier
Returns:
the Roots
See Also:
for details.

org.netbeans.modules.java.api.common/0 1.37

Built on May 22 2012.  |  Portions Copyright 1997-2012 Oracle. All rights reserved.