Package org.jenkinsci.plugins.variant
Class OptionalExtensionProcessor
java.lang.Object
hudson.ExtensionFinder.GuiceExtensionAnnotation<OptionalExtension>
org.jenkinsci.plugins.variant.OptionalExtensionProcessor
@Extension
public class OptionalExtensionProcessor
extends ExtensionFinder.GuiceExtensionAnnotation<OptionalExtension>
Processes extensions marked with
OptionalExtension and decides when they are activated.- Author:
- Kohsuke Kawaguchi
-
Field Summary
Fields inherited from class hudson.ExtensionFinder.GuiceExtensionAnnotation
annotationType -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected doublegetOrdinal(OptionalExtension annotation) protected booleanGo up the scope chain (method > class > package > ...) and make sure anyOptionalExtensions we encounter are satisified.protected booleanisOptional(OptionalExtension annotation) If the trigger condition is not met, we filter it by not making the extension active, which means extensions could always be non-optional as far asExtensionFinder.GuiceExtensionAnnotationis concerned.
-
Constructor Details
-
OptionalExtensionProcessor
public OptionalExtensionProcessor()
-
-
Method Details
-
getOrdinal
- Specified by:
getOrdinalin classExtensionFinder.GuiceExtensionAnnotation<OptionalExtension>
-
isOptional
If the trigger condition is not met, we filter it by not making the extension active, which means extensions could always be non-optional as far asExtensionFinder.GuiceExtensionAnnotationis concerned. But in some situations, the class cannot even be loaded which would makeExtensionFinder.GuiceExtensionAnnotationto fail, so we need to also make it optional.See JENKINS-37317
- Specified by:
isOptionalin classExtensionFinder.GuiceExtensionAnnotation<OptionalExtension>
-
isActive
Go up the scope chain (method > class > package > ...) and make sure anyOptionalExtensions we encounter are satisified.- Specified by:
isActivein classExtensionFinder.GuiceExtensionAnnotation<OptionalExtension>
-