Package io.helidon.microprofile.testing
Class HelidonTestDescriptorBase<T extends AnnotatedElement>
java.lang.Object
io.helidon.microprofile.testing.HelidonTestDescriptorBase<T>
- Type Parameters:
T
- annotated element type
- All Implemented Interfaces:
HelidonTestDescriptor<T>
public abstract class HelidonTestDescriptorBase<T extends AnnotatedElement>
extends Object
implements HelidonTestDescriptor<T>
Base implementation.
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprotected
HelidonTestDescriptorBase
(T element) Create a new instance. -
Method Summary
Modifier and TypeMethodDescriptionaddBeans()
Get the discoveredAddBean
annotations.Get the discoveredAddConfigBlock
annotations.Get the discoveredAddConfig
annotations.Get the discoveredAddConfigSource
methods.Get the discoveredAddExtension
annotations.boolean
addJaxRs()
Get the discoveredAddJaxRs
annotation.<A extends Annotation>
Stream<A> annotations
(Class<A> aType) Get annotations.<A extends Annotation,
C extends Annotation>
Stream<A> annotations
(Class<A> aType, Class<C> cType, Function<C, A[]> function) Get annotations.Get the discoveredConfiguration
annotation.boolean
Get the value of the discoveredDisableDiscovery
annotation.element()
Get the annotated element.Lookup theAddBean
annotations.protected List
<AddConfigBlock> Lookup theAddConfigBlock
annotations.Lookup theAddConfig
annotations.protected List
<AddExtension> Lookup theAddExtension
annotations.protected boolean
Lookup theAddJaxRs
annotation.protected Optional
<Configuration> Lookup theConfiguration
annotation.protected boolean
Lookup theDisableDiscovery
annotation.protected boolean
Lookup the value of@HelidonTest(pinningDetection = true)
.protected long
Lookup the value of@HelidonTest(pinningThreshold = 50)
.protected boolean
Lookup the value of@HelidonTest(resetPerTest = true)
.boolean
Get the discovered value of@HelidonTest(pinningDetection = true)
.long
Get the discovered value of@HelidonTest(pinningThreshold = 50)
.boolean
Get the discovered value of@HelidonTest(resetPerTest = true)
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface io.helidon.microprofile.testing.HelidonTestDescriptor
containsAnnotation, containsExtension
-
Constructor Details
-
HelidonTestDescriptorBase
Create a new instance.- Parameters:
element
- element
-
-
Method Details
-
element
Description copied from interface:HelidonTestDescriptor
Get the annotated element.- Specified by:
element
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
- element
-
resetPerTest
public boolean resetPerTest()Description copied from interface:HelidonTestDescriptor
Get the discovered value of@HelidonTest(resetPerTest = true)
.- Specified by:
resetPerTest
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
resetPerTest
value
-
pinningDetection
public boolean pinningDetection()Description copied from interface:HelidonTestDescriptor
Get the discovered value of@HelidonTest(pinningDetection = true)
.- Specified by:
pinningDetection
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
pinningDetection
value
-
pinningThreshold
public long pinningThreshold()Description copied from interface:HelidonTestDescriptor
Get the discovered value of@HelidonTest(pinningThreshold = 50)
.- Specified by:
pinningThreshold
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
pinningThreshold
value
-
addExtensions
Description copied from interface:HelidonTestDescriptor
Get the discoveredAddExtension
annotations.- Specified by:
addExtensions
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
- annotations
-
addBeans
Description copied from interface:HelidonTestDescriptor
Get the discoveredAddBean
annotations.- Specified by:
addBeans
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
- annotations
-
addJaxRs
public boolean addJaxRs()Description copied from interface:HelidonTestDescriptor
Get the discoveredAddJaxRs
annotation.- Specified by:
addJaxRs
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
true
if the annotation is present
-
disableDiscovery
public boolean disableDiscovery()Description copied from interface:HelidonTestDescriptor
Get the value of the discoveredDisableDiscovery
annotation.- Specified by:
disableDiscovery
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
DisableDiscovery.value()
orfalse
if not found
-
configuration
Description copied from interface:HelidonTestDescriptor
Get the discoveredConfiguration
annotation.- Specified by:
configuration
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
- annotation
-
addConfigs
Description copied from interface:HelidonTestDescriptor
Get the discoveredAddConfig
annotations.- Specified by:
addConfigs
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
- annotations
-
addConfigBlocks
Description copied from interface:HelidonTestDescriptor
Get the discoveredAddConfigBlock
annotations.- Specified by:
addConfigBlocks
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
- annotations
-
addConfigSources
Get the discoveredAddConfigSource
methods.- Specified by:
addConfigSources
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Returns:
- annotations
-
lookupResetPerTest
protected boolean lookupResetPerTest()Lookup the value of@HelidonTest(resetPerTest = true)
.- Returns:
resetPerTest
value
-
lookupPinningDetection
protected boolean lookupPinningDetection()Lookup the value of@HelidonTest(pinningDetection = true)
.- Returns:
pinningDetection
value
-
lookupPinningThreshold
protected long lookupPinningThreshold()Lookup the value of@HelidonTest(pinningThreshold = 50)
.- Returns:
pinningThreshold
value
-
lookupAddExtensions
Lookup theAddExtension
annotations.- Returns:
- annotations
-
lookupAddBeans
Lookup theAddBean
annotations.- Returns:
- annotations
-
lookupAddJaxRs
protected boolean lookupAddJaxRs()Lookup theAddJaxRs
annotation.- Returns:
- annotation
-
lookupDisableDiscovery
protected boolean lookupDisableDiscovery()Lookup theDisableDiscovery
annotation.- Returns:
- annotation
-
lookupConfiguration
Lookup theConfiguration
annotation.- Returns:
- annotation
-
lookupAddConfigs
Lookup theAddConfig
annotations.- Returns:
- annotations
-
lookupAddConfigBlocks
Lookup theAddConfigBlock
annotations.- Returns:
- annotations
-
annotations
public <A extends Annotation,C extends Annotation> Stream<A> annotations(Class<A> aType, Class<C> cType, Function<C, A[]> function) Description copied from interface:HelidonTestDescriptor
Get annotations.- Specified by:
annotations
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Type Parameters:
A
- annotation typeC
- container type- Parameters:
aType
- annotation typecType
- annotation container typefunction
- function to inflate from container- Returns:
- annotations
-
annotations
Description copied from interface:HelidonTestDescriptor
Get annotations.- Specified by:
annotations
in interfaceHelidonTestDescriptor<T extends AnnotatedElement>
- Type Parameters:
A
- annotation type- Parameters:
aType
- annotation type- Returns:
- annotations
-