Interface Resource
- All Known Subinterfaces:
AppJarFile, BndBaselineEvaluation, ClassFile, ClasspathElement, ClassTree, Cleanliness, EclipseConfiguration, ExecResult<T>, FileResource, FileTree<T>, IOResource, JarFile, JavadocDirectory, JavadocJarFile, JavaResourceTree, JavaSourceFile, LibraryJarFile, MvnPublication, MvnRepoBom, MvnRepoDependency, MvnRepoJarFile, MvnRepoLibraryJarFile, MvnRepoPom, MvnRepoResource, PomFile, ResourceFile, Resources<T>, SourcesJarFile, TestResult, VirtualResource, VscodeConfiguration
- All Known Implementing Classes:
DefaultBndBaselineEvaluation, DefaultClassTree, DefaultEclipseConfiguration, DefaultExecResult, DefaultFileResource, DefaultFileTree, DefaultJarFile, DefaultJavaResourceTree, DefaultLibraryJarFile, DefaultMvnRepoResource, DefaultResources, DefaultTestResult, DefaultVirtualResource, JarFileEntry, ManifestAttributes, ResourceObject, ServicesEntryResource
public interface Resource
Represents a resource handled by the builder. Resources can have names
that may be referenced in
ResourceRequests.-
Method Summary
Modifier and TypeMethodDescriptionasOf()The instant at which this resource was created or last modified.default StringReturns a localized string representation of the instant at which this resource was created or last modified.default voidcleanup()Cleanup the resource.default booleanisNewerThan(Resource other) Checks if this resource is newer than the other.name()Returns the name of this resource if set.ResourceType<?> type()Returns the type of this resource.
-
Method Details
-
asOf
-
isNewerThan
Checks if this resource is newer than the other.- Parameters:
other- the other- Returns:
- true, if is newer than
-
type
-
name
-
cleanup
Cleanup the resource. This method is called byResourceProviders in response to a request forCleanliness. The default implementation does nothing. Derived classes should override this and delete any physical representation of the resource. -
asOfLocalized
Returns a localized string representation of the instant at which this resource was created or last modified.- Returns:
- the string
-