Interface ElementsLocalBuilder
- All Known Implementing Classes:
StandardElementsLocalBuilder
public interface ElementsLocalBuilder
A builder type for the
ElementsLocal
instance.-
Method Summary
Modifier and TypeMethodDescriptionbuild()
Builds theElementsLocal
instancestatic ElementsLocalBuilder
Gets a default instance of theElementsLocalBuilder
.withAttributes
(Attributes attributes) Specifies the system properties as anAttributes
instance.Specifies the classloader constructor to use for loading theElement
.default ElementsLocalBuilder
Delegates to the system classloader to load elements.default ElementsLocalBuilder
withElementNamed
(String applicationNameOrId, String aPacakge) Specifies anElement
to load associated with the supplied package.withElementNamed
(String applicationNameOrId, String elementName, Attributes attributes) Specifies anElement
to load associated with the supplied package.default ElementsLocalBuilder
withProperties
(Properties properties) Specifies the system properties as aProperties
instance.
-
Method Details
-
withProperties
Specifies the system properties as aProperties
instance.- Parameters:
properties
- properties- Returns:
- this instance
-
withAttributes
Specifies the system properties as anAttributes
instance.- Parameters:
attributes
- the attributes- Returns:
- this instance
-
withElementNamed
Specifies anElement
to load associated with the supplied package.- Parameters:
applicationNameOrId
- the name or id of theApplication
aPacakge
- the name of the Java package for the Element- Returns:
- this instance
-
withElementNamed
ElementsLocalBuilder withElementNamed(String applicationNameOrId, String elementName, Attributes attributes) Specifies anElement
to load associated with the supplied package.- Parameters:
applicationNameOrId
- the name or id of theApplication
elementName
- the name of the Elementattributes
- theAttributes
to 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 theElementsLocal
instance- Returns:
- the
ElementsLocal
instance
-
getDefault
Gets a default instance of theElementsLocalBuilder
.- Returns:
- the
ElementsLocalBuilder
-