MixInResolver implementation that both allows simple "local"
override definitions (with simple Mix-in class over Target class mapping)
and allows optional custom overrides for lookup.
Implementation is only thread-safe after initialization (that is, when underlying Map is not modified but only read).
| Modifier and Type | Field and Description |
|---|---|
| protected Map | _localMixIns
Simple mix-in targets defined locally. |
| protected final MixInResolver | _overrides
External resolver that gets called before looking at any locally defined mix-in target classes. |
| private static final long |
| Access | Constructor and Description |
|---|---|
| public | |
| protected |
| Modifier and Type | Method and Description |
|---|---|
| public MixInHandler | |
| public MixInHandler | |
| public MixInHandler | |
| public Class | findMixInClassFor(Class<?> cls)
Implements tools. Method that will check if there are "mix-in" classes (with mix-in annotations) for given class |
| public boolean | hasMixIns()
Implements tools. Method that may be called for optimization purposes, to see if calls to mix-in resolver may be avoided. |
| public int | |
| public MixInHandler | snapshot()
Implements tools. Method called to create a new, non-shared copy, to be used by different
|
| public MixInHandler | withoutLocalDefinitions()
Mutant factory method that constructs a new instance that has no locally defined mix-in/target mappings. |
| public MixInHandler | withOverrides(MixInResolver overrides)
Mutant factory for constructor a new resolver instance with given mix-in resolver override. |
| _localMixIns | back to summary |
|---|---|
| protected Map<ClassKey, Class<?>> _localMixIns Simple mix-in targets defined locally. | |
| _overrides | back to summary |
|---|---|
| protected final MixInResolver _overrides External resolver that gets called before looking at any locally defined mix-in target classes. | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| MixInHandler | back to summary |
|---|---|
| public MixInHandler(MixInResolver overrides) | |
| MixInHandler | back to summary |
|---|---|
| protected MixInHandler(MixInResolver overrides, Map<ClassKey, Class<?>> mixins) | |
| addLocalDefinition | back to summary |
|---|---|
| public MixInHandler addLocalDefinition(Class<?> target, Class<?> mixinSource) | |
| addLocalDefinitions | back to summary |
|---|---|
| public MixInHandler addLocalDefinitions(Map<Class<?>, Class<?>> sourceMixins) | |
| clearLocalDefinitions | back to summary |
|---|---|
| public MixInHandler clearLocalDefinitions(Map<Class<?>, Class<?>> sourceMixins) | |
| findMixInClassFor | back to summary |
|---|---|
| public Class Implements tools. Doc from tools. Method that will check if there are "mix-in" classes (with mix-in annotations) for given class
| |
| hasMixIns | back to summary |
|---|---|
| public boolean hasMixIns() Implements tools. Doc from tools. Method that may be called for optimization purposes, to see if calls to
mix-in resolver may be avoided. Return value of Note that the reason for "empty" resolvers is to use "null object" for simplifying calling code.
| |
| localSize | back to summary |
|---|---|
| public int localSize() | |
| snapshot | back to summary |
|---|---|
| public MixInHandler snapshot() Implements tools. Doc from tools. Method called to create a new, non-shared copy, to be used by different
| |
| withoutLocalDefinitions | back to summary |
|---|---|
| public MixInHandler withoutLocalDefinitions() Mutant factory method that constructs a new instance that has no locally defined mix-in/target mappings. | |
| withOverrides | back to summary |
|---|---|
| public MixInHandler withOverrides(MixInResolver overrides) Mutant factory for constructor a new resolver instance with given mix-in resolver override. | |