- Type Parameters:
A- annotation containing AdviceMode attribute
- All Implemented Interfaces:
- Direct Known Subclasses:
ImportSelectorimplementations that select imports based on an
AdviceModevalue from an annotation (such as the
- Chris Beams
Method SummaryModifier and TypeMethodDescription
protected StringThe name of the
AdviceModeattribute for the annotation specified by the generic type
protected abstract StringDetermine which classes should be imported based on the given
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getAdviceModeAttributeNameprotected String getAdviceModeAttributeName()
selectImportsThis implementation resolves the type of annotation from generic metadata and validates that (a) the annotation is in fact present on the importing
@Configurationclass and (b) that the given annotation has an advice mode attribute of type
selectImports(AdviceMode)method is then invoked, allowing the concrete implementation to choose imports in a safe and convenient fashion.
selectImportsDetermine which classes should be imported based on the given
nullfrom this method indicates that the
AdviceModecould not be handled or was unknown and that an
IllegalArgumentExceptionshould be thrown.
adviceMode- the value of the advice mode attribute for the annotation specified via generics.
- array containing classes to import (empty array if none;
nullif the given