|
org.netbeans.modules.java.j2seproject/1 1.53.0 46 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.netbeans.modules.java.j2seproject.api.J2SEProjectBuilder
public class J2SEProjectBuilder
Builder for creating a new J2SE project. Typical usage is:
new J2SEProjectBuilder(projectFolder, projectName).
addSourceRoots(sourceFolders).
addTestRoots(testFolders).
setMainClass(mainClass).
build();
XXX: Uses Bundle from org.netbeans.modules.java.j2seproject package not to affect
existing localizations.
| Constructor Summary | |
|---|---|
J2SEProjectBuilder(File projectDirectory,
String name)
Creates a new instance of J2SEProjectBuilder |
|
| Method Summary | |
|---|---|
J2SEProjectBuilder |
addCompileLibraries(Library... libraries)
Adds compile time libraries |
J2SEProjectBuilder |
addDefaultSourceRoots()
Adds the default source roots, "src" and "test". |
J2SEProjectBuilder |
addJVMArguments(String jvmArgs)
Adds a JVM arguments |
J2SEProjectBuilder |
addRuntimeLibraries(Library... libraries)
Adds runtime libraries |
J2SEProjectBuilder |
addSourceRoots(File... sourceRoots)
Adds source roots into the project |
J2SEProjectBuilder |
addTestRoots(File... testRoots)
Adds test roots into the project |
AntProjectHelper |
build()
Creates the J2SEProject |
J2SEProjectBuilder |
setBuildXmlName(String name)
Sets a name of build.xml file |
J2SEProjectBuilder |
setDistFolder(String distFolderName)
Sets a name of dist (build artifact) folder |
J2SEProjectBuilder |
setJavaPlatform(JavaPlatform platform)
Sets a platform to be used for a new project |
J2SEProjectBuilder |
setLibrariesDefinitionFile(String librariesDefinition)
Sets a library definition file for per project libraries, |
J2SEProjectBuilder |
setMainClass(String mainClass)
Sets a main class |
J2SEProjectBuilder |
setMainClassTemplate(String mainClassTemplatePath)
Sets a main class template |
J2SEProjectBuilder |
setManifest(String manifest)
Sets a path to manifest file |
J2SEProjectBuilder |
setSourceLevel(SpecificationVersion sourceLevel)
Sets a source level of the project |
J2SEProjectBuilder |
skipTests(boolean skipTests)
Avoids creating the test root folder and adding JUnit dependencies. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public J2SEProjectBuilder(@NonNull
File projectDirectory,
@NonNull
String name)
J2SEProjectBuilder
projectDirectory - the directory in which the project should be createdname - the name of the project| Method Detail |
|---|
public J2SEProjectBuilder addDefaultSourceRoots()
public J2SEProjectBuilder skipTests(boolean skipTests)
SourceGroupModifier with JavaProjectConstants.SOURCES_HINT_TEST will work later.
public J2SEProjectBuilder addSourceRoots(@NonNull
File... sourceRoots)
sourceRoots - the roots to be added
public J2SEProjectBuilder addTestRoots(@NonNull
File... testRoots)
testRoots - the roots to be added
public J2SEProjectBuilder addCompileLibraries(@NonNull
Library... libraries)
libraries - the libraries to be added to compile classpath.
public J2SEProjectBuilder addRuntimeLibraries(@NonNull
Library... libraries)
libraries - the libraries to be added to runtime classpath.
public J2SEProjectBuilder setMainClass(@NullAllowed
String mainClass)
mainClass - the fully qualified name of the main class,
if null main class is not created
public J2SEProjectBuilder setManifest(@NullAllowed
String manifest)
manifest - the name (path) to manifest file,
if not manifest is not set
public J2SEProjectBuilder setLibrariesDefinitionFile(@NullAllowed
String librariesDefinition)
librariesDefinition - the name (path) to libraries definition file,
if null project libraries are not used
public J2SEProjectBuilder setSourceLevel(@NullAllowed
SpecificationVersion sourceLevel)
sourceLevel - the source level,
if null the default source level is used.
public J2SEProjectBuilder setBuildXmlName(@NullAllowed
String name)
name - the name of build.xml file,
if null the default 'build.xml' is used
@NonNull
public J2SEProjectBuilder setDistFolder(@NullAllowed
String distFolderName)
distFolderName - the name of the dist folder
if null the default 'dist' is used
public J2SEProjectBuilder setMainClassTemplate(@NullAllowed
String mainClassTemplatePath)
mainClassTemplatePath - the path to main class template on the system filesystem,
if null the default template is used
public J2SEProjectBuilder addJVMArguments(@NonNull
String jvmArgs)
jvmArgs - the arguments to be added
public J2SEProjectBuilder setJavaPlatform(@NonNull
JavaPlatform platform)
platform - to be used
public AntProjectHelper build()
throws IOException
AntProjectHelper of the created project
IOException - when creation fails
|
org.netbeans.modules.java.j2seproject/1 1.53.0 46 | |||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||