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

org.netbeans.modules.java.api.common.util
Class CommonProjectUtils

java.lang.Object
  extended by org.netbeans.modules.java.api.common.util.CommonProjectUtils

public final class CommonProjectUtils
extends Object

Common project utilities. This is a helper class; all methods are static.


Method Summary
static JavaPlatform getActivePlatform(String activePlatformId)
          Returns the active platform used by the project or null if the active project platform is broken.
static String getAntPropertyName(String property)
          Converts the ant reference to the name of the referenced property.
static Collection<ElementHandle<TypeElement>> getMainMethods(FileObject fo)
           
static boolean hasMainMethod(FileObject fo)
          Check if the given file object represents a source with the main method.
static boolean isMainClass(String className, ClassPath bootPath, ClassPath compilePath, ClassPath sourcePath)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getActivePlatform

public static JavaPlatform getActivePlatform(String activePlatformId)
Returns the active platform used by the project or null if the active project platform is broken.

Parameters:
activePlatformId - the name of platform used by Ant script or null for default platform.
Returns:
active JavaPlatform or null if the project's platform is broken

getAntPropertyName

public static String getAntPropertyName(String property)
Converts the ant reference to the name of the referenced property.

Parameters:
property - the name of the referenced property.
Returns:
the referenced property.

getMainMethods

public static Collection<ElementHandle<TypeElement>> getMainMethods(FileObject fo)

hasMainMethod

public static boolean hasMainMethod(FileObject fo)
Check if the given file object represents a source with the main method.

Parameters:
fo - source
Returns:
true if the source contains the main method

isMainClass

public static boolean isMainClass(String className,
                                  ClassPath bootPath,
                                  ClassPath compilePath,
                                  ClassPath sourcePath)

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

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