Class HostSourceDirective
java.lang.Object
com.shapesecurity.salvation2.Directive
com.shapesecurity.salvation2.Directives.HostSourceDirective
- Direct Known Subclasses:
FrameAncestorsDirective
,SourceExpressionDirective
-
Nested Class Summary
Nested classes/interfaces inherited from class com.shapesecurity.salvation2.Directive
Directive.DirectiveErrorConsumer, Directive.ManipulationErrorConsumer
-
Field Summary
FieldsFields inherited from class com.shapesecurity.salvation2.Directive
containsNonDirectiveCharacter, values
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) void
_addHostOrSchemeDuringConstruction
(String token, String lowcaseToken, String kind, int index, Directive.DirectiveErrorConsumer errors) private boolean
_addHostSource
(Host source, int index, Directive.DirectiveErrorConsumer errors) private boolean
_addScheme
(Scheme scheme, int index, Directive.DirectiveErrorConsumer errors) void
addHost
(Host host, Directive.ManipulationErrorConsumer errors) void
addScheme
(Scheme scheme, Directive.ManipulationErrorConsumer errors) protected void
getHosts()
boolean
removeHost
(Host host) boolean
removeScheme
(Scheme scheme) protected void
removeValueIgnoreCase
(String value) protected <T> void
removeValuesMatching
(T value, Function<String, Optional<T>> parser) boolean
self()
void
setSelf
(boolean self) void
setStar
(boolean star) boolean
star()
Methods inherited from class com.shapesecurity.salvation2.Directive
getValues, wrapManipulationErrorConsumer
-
Field Details
-
schemes
-
hosts
-
star
protected boolean star -
self
protected boolean self -
none
-
-
Constructor Details
-
HostSourceDirective
-
-
Method Details
-
addValue
-
removeValueIgnoreCase
- Overrides:
removeValueIgnoreCase
in classDirective
-
removeValuesMatching
-
_addHostOrSchemeDuringConstruction
void _addHostOrSchemeDuringConstruction(String token, String lowcaseToken, String kind, int index, Directive.DirectiveErrorConsumer errors) -
_addScheme
-
_addHostSource
-
star
public boolean star() -
setStar
public void setStar(boolean star) -
self
public boolean self() -
setSelf
public void setSelf(boolean self) -
getSchemes
-
addScheme
-
removeScheme
-
getHosts
-
addHost
-
removeHost
-