Class EclipseFolder

    • Method Detail

      • unwrap

        public org.eclipse.core.resources.IFolder 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 EclipseContainer
        See Also:
        Wrappers#unwrap(AAbstraction) for a way to unwrap potentially null abstractions.
      • getFile

        public AFile getFile​(java.lang.String name)
        Description copied from interface: AFolder
        Returns the file with the given name contained in this folder.

        Note that that file does not necessarily exist.

        Specified by:
        getFile in interface AFolder
        Parameters:
        name - the file's name
        Returns:
        the file with the given name
      • getFolder

        public AFolder getFolder​(java.lang.String name)
        Description copied from interface: AFolder
        Returns the folder with the given name contained in this folder.

        Note that that folder does not necessarily exist.

        Specified by:
        getFolder in interface AFolder
        Parameters:
        name - the folder name
        Returns:
        the folder with the given name
      • create

        public void create​(org.eclipse.core.runtime.IProgressMonitor monitor)
        Description copied from interface: AFolder
        Creates this folder in the file-system.
        Specified by:
        create in interface AFolder
        Parameters:
        monitor - a progress monitor that is notified about this process. The monitor may be null when progress does not need to be reported.