@Retention(value=RUNTIME) @Target(value=TYPE) @Repeatable(value=GroupExport.List.class) @Documented public @interface GroupExport
Exports via this annotation happen automatically at startup. There are also manual exports -
See AndHow.export(Class[]).
Only Property's directly contained in the annotated class are exported: Properties in
nested inner classes or interfaces are not included, though those inner classes could also be
annotated (this behaviour differs from manual exports).
This example would export the contained Properties to System.Properties, using 'out' aliases if they exist, otherwise using canonical names:
import org.yarnandtail.andhow.*;
import static org.yarnandtail.andhow.api.Exporter.*;
import org.yarnandtail.andhow.export.SysPropExporter;
@GroupExport(
exporter=SysPropExporter.class,
exportByCanonicalName=EXPORT_CANONICAL_NAME.ONLY_IF_NO_OUT_ALIAS,
exportByOutAliases=EXPORT_OUT_ALIASES.ALWAYS
)
class MyClass {
//Class containing Property classes...
}
| Modifier and Type | Required Element and Description |
|---|---|
Exporter.EXPORT_CANONICAL_NAME |
exportByCanonicalName
Specifies if the canonical name should be used to export property values.
|
Exporter.EXPORT_OUT_ALIASES |
exportByOutAliases
Specifies if the out aliases, which are basically aliases for the purpose
of exports, should be used to export property values.
|
Class<? extends Exporter> |
exporter
The class of the exporter to use.
|
public abstract Exporter.EXPORT_CANONICAL_NAME exportByCanonicalName
public abstract Exporter.EXPORT_OUT_ALIASES exportByOutAliases
Copyright © 2022. All rights reserved.