Interface ImportedResourceBuilder
- All Known Implementing Classes:
DefaultImportedResourceBuilder
public interface ImportedResourceBuilder
Provides a way of creating
ImportedResource instances, adding and configuring its attributes.- Since:
- 1.0
-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds the target imported resource.static ImportedResourceBuilderbuilder()Instantiates a new raw builder.withMetadata(ComponentMetadataAst metadata) Sets the imported resource metadata to the builder.withResolutionFailure(String failureMessage) Sets the failure caused when resolving this import, if resolution failed.withResourceLocation(String resourceLocation) Sets the imported resource name to the builder.
-
Method Details
-
builder
Instantiates a new raw builder.- Returns:
- the newly created builder
-
withResourceLocation
Sets the imported resource name to the builder.- Parameters:
resourceLocation- the resource location.- Returns:
- the builder with the name set.
-
withMetadata
Sets the imported resource metadata to the builder.- Parameters:
metadata- the component metadata.- Returns:
- the builder with the metadata set.
-
withResolutionFailure
Sets the failure caused when resolving this import, if resolution failed.- Parameters:
failureMessage- a message explaining why the import resolution failed.- Returns:
- the builder with the metadata set.
-
build
ImportedResource build()Builds the target imported resource.- Returns:
- the target imported resource.
-