public final class CommonProjectUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static LibraryImplementation3 |
createJavaLibraryImplementation(String name,
URL[] classPath,
URL[] sources,
URL[] javadoc,
String[] mavendeps,
String[] mavenrepos)
Creates a
LibraryImplementation3 that can subsequently be used with
both Ant and Maven based Java projects. |
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) |
public static JavaPlatform getActivePlatform(String activePlatformId)
activePlatformId - the name of platform used by Ant script or null
for default platform.JavaPlatform or null if the project's platform
is brokenpublic static String getAntPropertyName(String property)
property - the name of the referenced property.public static Collection<ElementHandle<TypeElement>> getMainMethods(FileObject fo)
public static boolean hasMainMethod(FileObject fo)
fo - sourcepublic static boolean isMainClass(String className, ClassPath bootPath, ClassPath compilePath, ClassPath sourcePath)
public static LibraryImplementation3 createJavaLibraryImplementation(@NonNull String name, @NonNull URL[] classPath, @NonNull URL[] sources, @NonNull URL[] javadoc, @NonNull String[] mavendeps, @NonNull String[] mavenrepos)
LibraryImplementation3 that can subsequently be used with
both Ant and Maven based Java projects.classpath - local library classpath for use by Antsrc - local library sources for use by Antjavadoc - local Javadoc path for use by Antmavendeps - list of maven dependencies in the form of groupId:artifactId:version:type,
for example org.eclipse.persistence:eclipselink:2.3.2:jarmavenrepos - list of maven repositories in the form of layout:url,
for example default:http://download.eclipse.org/rt/eclipselink/maven.repo/LibraryImplementation3 representing the information passed as parametersBuilt on May 16 2013. | Portions Copyright 1997-2013 Oracle. All rights reserved.