Class PlainJavaJavaProject

    • Constructor Detail

      • PlainJavaJavaProject

        public PlainJavaJavaProject​(java.io.File project)
    • Method Detail

      • unwrap

        public java.io.File unwrap()
        Description copied from interface: AAbstraction
        Returns the platform-specific object corresponding to this abstraction. The generic type parameter is used to avoid casts when assigning to platform-specific objects. It is the obligation of the caller to make sure the right type is used, otherwise a ClassCastException will be thrown.

        Sample usage:

         
         interface ACalendar extends AAbstraction[...]
         class LocalDateAsCalendarWrapper extends AWrapper<LocalDate>[...]
         [...]
         ACalendar calendar = Wrappers.of(LocalDate.now()).as(ACalendar.class);
         [...]
         LocalDate date = calendar.unwrap();
         
         
        Specified by:
        unwrap in interface AAbstraction
        Overrides:
        unwrap in class AWrapper<java.io.File>
        See Also:
        Wrappers#unwrap(AAbstraction) for a way to unwrap potentially null abstractions.
      • exists

        public boolean exists()
        Description copied from interface: AJavaElement
        A Java element exists if its corresponding resource exists and contains information for this element.
        Specified by:
        exists in interface AJavaElement
        Specified by:
        exists in interface AJavaProject
        Overrides:
        exists in class PlainJavaJavaElement
        Returns:
        whether this element exists
      • hasBuildState

        public boolean hasBuildState()
        Description copied from interface: AJavaProject
        Returns whether this project has previously been built and retains some information about that build.
        Specified by:
        hasBuildState in interface AJavaProject
      • getOutputLocation

        public java.nio.file.Path getOutputLocation()
        Description copied from interface: AJavaProject
        Returns the default output location for this project as a path relative to the containing workspace.
        Specified by:
        getOutputLocation in interface AJavaProject
      • toPackageFragmentRoot

        public APackageFragmentRoot toPackageFragmentRoot​(java.lang.String externalLibraryPath)
        Description copied from interface: AJavaProject
        Returns the package fragment root for an external library. The Path must either be a file or a folder outside of the workspace.
        Specified by:
        toPackageFragmentRoot in interface AJavaProject
        Parameters:
        externalLibraryPath - the path to the external library, either a folder or archive file
      • toPackageFragmentRoot

        public APackageFragmentRoot toPackageFragmentRoot​(AResource resource)
        Description copied from interface: AJavaProject
        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

        Specified by:
        toPackageFragmentRoot in interface AJavaProject
        Parameters:
        resource - the path to the root, either a folder or archive file
      • getSourceVersion

        public java.lang.Runtime.Version getSourceVersion()
        Description copied from interface: AJavaProject
        Returns the Java version number for this project's source code.
        Specified by:
        getSourceVersion in interface AJavaProject
      • isJavaFolder

        public boolean isJavaFolder​(AResource resource)
        Description copied from interface: AJavaProject
        Returns whether the given resource is a Java folder.
        Specified by:
        isJavaFolder in interface AJavaProject
      • validateJavaProjectBuildPath

        public org.faktorips.runtime.MessageList validateJavaProjectBuildPath()
        Description copied from interface: AJavaProject
        Validates whether this project's build path is configured correctly, adding any errors to the returned list.
        Specified by:
        validateJavaProjectBuildPath in interface AJavaProject
      • getOptions

        public java.util.Map<java.lang.String,​java.lang.String> getOptions()
        Description copied from interface: AJavaProject
        Returns the options for this project.
        Specified by:
        getOptions in interface AJavaProject