Interface ElementsLocalBuilder
- All Known Implementing Classes:
StandardElementsLocalBuilder
public interface ElementsLocalBuilder
A builder type for the
ElementsLocal instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()Builds theElementsLocalinstancestatic ElementsLocalBuilderGets a default instance of theElementsLocalBuilder.withAttributes(Attributes attributes) Specifies the system properties as anAttributesinstance.Specifies the classloader constructor to use for loading theElement.default ElementsLocalBuilderDelegates to the system classloader to load elements.default ElementsLocalBuilderwithElementNamed(String applicationNameOrId, String aPacakge) Specifies anElementto load associated with the supplied package.withElementNamed(String applicationNameOrId, String elementName, Attributes attributes) Specifies anElementto load associated with the supplied package.default ElementsLocalBuilderwithProperties(Properties properties) Specifies the system properties as aPropertiesinstance.
-
Method Details
-
withProperties
Specifies the system properties as aPropertiesinstance.- Parameters:
properties- properties- Returns:
- this instance
-
withAttributes
Specifies the system properties as anAttributesinstance.- Parameters:
attributes- the attributes- Returns:
- this instance
-
withElementNamed
Specifies anElementto load associated with the supplied package.- Parameters:
applicationNameOrId- the name or id of theApplicationaPacakge- the name of the Java package for the Element- Returns:
- this instance
-
withElementNamed
ElementsLocalBuilder withElementNamed(String applicationNameOrId, String elementName, Attributes attributes) Specifies anElementto load associated with the supplied package.- Parameters:
applicationNameOrId- the name or id of theApplicationelementName- the name of the Elementattributes- theAttributesto use when loading the package- Returns:
- this instance
-
withDelegatingClassLoader
Delegates to the system classloader to load elements. This is the default behavior.- Returns:
- this instance
-
withClassLoaderConstructor
ElementsLocalBuilder withClassLoaderConstructor(ElementLoaderFactory.ClassLoaderConstructor constructor) Specifies the classloader constructor to use for loading theElement. This is passed toElementLoaderFactory.getIsolatedLoader(Attributes, ClassLoader, ClassLoaderConstructor, Predicate)- Parameters:
constructor- the constructor- Returns:
- this instance
-
build
ElementsLocal build()Builds theElementsLocalinstance- Returns:
- the
ElementsLocalinstance
-
getDefault
Gets a default instance of theElementsLocalBuilder.- Returns:
- the
ElementsLocalBuilder
-