Package org.eclipse.imagen.util
Class ExactClassAllowList
Object
ExactClassAllowList
Utility for loading immutable exact-class allow-lists from built-in defaults plus optional runtime configuration.
The resulting allow-list always contains the supplied defaults and may be extended through a system property or,
if the property is blank, an environment variable. Instances of ExactClassAllowList.Snapshot are immutable and therefore safe to
share between threads.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classImmutable view of a loaded exact-class allow-list and the configuration source used to build it. -
Method Summary
Modifier and TypeMethodDescriptionstatic ExactClassAllowList.SnapshotLoads an immutable allow-list snapshot.static ExactClassAllowList.SnapshotLoads an immutable allow-list snapshot including SPI-contributed defaults.
-
Method Details
-
load
public static ExactClassAllowList.Snapshot load(String propertyName, String envName, Set<String> defaults) Loads an immutable allow-list snapshot.System property values take precedence over environment variable values. Blank values are ignored. Runtime configuration extends the supplied defaults rather than replacing them.
- Parameters:
propertyName- system property containing a comma-separated list of exact FQNsenvName- environment variable containing a comma-separated list of exact FQNsdefaults- built-in defaults that are always allowed; must not benull- Returns:
- immutable snapshot of the resolved allow-list and its source
- Throws:
NullPointerException- ifdefaultsisnull
-
load
public static ExactClassAllowList.Snapshot load(String propertyName, String envName, Set<String> defaults, Set<String> contributedDefaults) Loads an immutable allow-list snapshot including SPI-contributed defaults.System property values take precedence over environment variable values. Blank values are ignored. Runtime configuration extends the supplied defaults and SPI-contributed values rather than replacing them.
- Parameters:
propertyName- system property containing a comma-separated list of exact FQNsenvName- environment variable containing a comma-separated list of exact FQNsdefaults- built-in defaults that are always allowed; must not benullcontributedDefaults- SPI-contributed defaults discovered at runtime; must not benull- Returns:
- immutable snapshot of the resolved allow-list and its source
- Throws:
NullPointerException- ifdefaultsorcontributedDefaultsisnull
-