Interface AJavaProject

    • 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:
        exists in interface AJavaElement
        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 the resource as package fragment root. Every sub folder of the resource will be considered as java package and therefore must be excluded in the path of the resource.

        For example the path of the resource in a typical eclipse project would be src. In a maven project the path would be src/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.