Class SCMNavigatorContext<C extends SCMNavigatorContext<C,R>,R extends SCMNavigatorRequest>

java.lang.Object
jenkins.scm.api.trait.SCMNavigatorContext<C,R>
Type Parameters:
C - the type of SCMNavigatorContext
R - the type of SCMNavigatorRequest produced by this context.

public abstract class SCMNavigatorContext<C extends SCMNavigatorContext<C,R>,R extends SCMNavigatorRequest> extends Object
Represents the context within which a SCMNavigator is processing requests. In general this is used as a builder for SCMNavigatorRequest instances through newRequest(SCMNavigator, SCMSourceObserver) but there are some cases (such as SCMSourceEvent processing) where only the context is required and as such this type will be instantiated to obtain the context but no SCMNavigatorRequest will be created. Conventions:
  • The context is not designed to be shared by multiple threads.
  • All methods should be either final or abstract unless there is a documented reason for allowing overrides
  • All "setter" methods will return SCMNavigatorContext and be called "withXxx"
  • All "getter" methods will be called "xxx()". Callers should not assume that the returned value is resistant from concurrent changes. Implementations should ensure that the returned value is immutable by the caller. In other words, it is intentional for implementations to reduce intermediate allocations by return Collections.unmodifiableList(theList); rather than the concurrency safe return Collections.unmodifiableList(new ArrayList<>(theList));
Since:
2.2.0