Interface AJavaProject
-
- All Superinterfaces:
AAbstraction,AJavaElement
- All Known Implementing Classes:
EclipseJavaProject,PlainJavaJavaProject
public interface AJavaProject extends AJavaElement
A Java project isa projectcontainingJava elements.
-
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Modifier and Type Method Description booleanexists()A Java project exists if its file-system equivalent exists (the path corresponds to an actual file/folder) and is configured to contain Java elements.static AJavaProjectfrom(AProject project)Returns the Java project matching the given project.java.util.Set<APackageFragmentRoot>getAllPackageFragmentRoots()Returns all of the existing package fragment roots that exist on the classpath, in the order they are defined by the classpath.java.util.Map<java.lang.String,java.lang.String>getOptions()Returns the options for this project.java.nio.file.PathgetOutputLocation()Returns the default output location for this project as a path relative to the containing workspace.AProjectgetProject()Returns the corresponding project.java.util.Set<AJavaProject>getReferencedJavaProjects()Returns all other Java projects referenced by this project.java.lang.Runtime.VersiongetSourceVersion()Returns the Java version number for this project's source code.booleanhasBuildState()Returns whether this project has previously been built and retains some information about that build.booleanisJavaFolder(AResource resource)Returns whether the given resource is a Java folder.APackageFragmentRoottoPackageFragmentRoot(java.lang.String externalLibraryPath)Returns the package fragment root for an external library.APackageFragmentRoottoPackageFragmentRoot(AResource resource)Returns theresourceas package fragment root.org.faktorips.runtime.MessageListvalidateJavaProjectBuildPath()Validates whether this project's build path is configured correctly, adding any errors to the returned list.-
Methods inherited from interface org.faktorips.devtools.abstraction.AAbstraction
unwrap
-
Methods inherited from interface org.faktorips.devtools.abstraction.AJavaElement
getJavaProject, getPath, getResource
-
-
-
-
Method Detail
-
getProject
AProject getProject()
Returns the corresponding project.
-
exists
boolean exists()
A Java project exists if its file-system equivalent exists (the path corresponds to an actual file/folder) and is configured to contain Java elements.- Specified by:
existsin interfaceAJavaElement- Returns:
- whether this project exists
-
hasBuildState
boolean hasBuildState()
Returns whether this project has previously been built and retains some information about that build.
-
getOutputLocation
java.nio.file.Path getOutputLocation()
Returns the default output location for this project as a path relative to the containing workspace.
-
toPackageFragmentRoot
APackageFragmentRoot toPackageFragmentRoot(java.lang.String externalLibraryPath)
Returns the package fragment root for an external library. The Path must either be a file or a folder outside of the workspace.- Parameters:
externalLibraryPath- the path to the external library, either a folder or archive file
-
toPackageFragmentRoot
APackageFragmentRoot toPackageFragmentRoot(AResource resource)
Returns theresourceas package fragment root. Every sub folder of theresourcewill be considered as java package and therefore must be excluded in the path of theresource.For example the path of the
resourcein a typical eclipse project would besrc. In a maven project the path would besrc/main/java- Parameters:
resource- the path to the root, either a folder or archive file
-
getAllPackageFragmentRoots
java.util.Set<APackageFragmentRoot> getAllPackageFragmentRoots()
Returns all of the existing package fragment roots that exist on the classpath, in the order they are defined by the classpath.
-
getSourceVersion
java.lang.Runtime.Version getSourceVersion()
Returns the Java version number for this project's source code.
-
getReferencedJavaProjects
java.util.Set<AJavaProject> getReferencedJavaProjects()
Returns all other Java projects referenced by this project.
-
isJavaFolder
boolean isJavaFolder(AResource resource)
Returns whether the given resource is a Java folder.
-
validateJavaProjectBuildPath
org.faktorips.runtime.MessageList validateJavaProjectBuildPath()
Validates whether this project's build path is configured correctly, adding any errors to the returned list.
-
from
static AJavaProject from(AProject project)
Returns the Java project matching the given project.
-
getOptions
java.util.Map<java.lang.String,java.lang.String> getOptions()
Returns the options for this project.
-
-