-
Notifications
You must be signed in to change notification settings - Fork 169
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1195 from HubSpot/context-configuration
Condense overrideable options in Context to ContextConfiguration immutable
- Loading branch information
Showing
3 changed files
with
105 additions
and
40 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
50 changes: 50 additions & 0 deletions
50
src/main/java/com/hubspot/jinjava/interpret/ContextConfigurationIF.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
package com.hubspot.jinjava.interpret; | ||
|
||
import com.hubspot.immutables.style.HubSpotImmutableStyle; | ||
import com.hubspot.jinjava.lib.expression.DefaultExpressionStrategy; | ||
import com.hubspot.jinjava.lib.expression.ExpressionStrategy; | ||
import javax.annotation.Nullable; | ||
import org.immutables.value.Value.Default; | ||
import org.immutables.value.Value.Immutable; | ||
|
||
@Immutable(singleton = true) | ||
@HubSpotImmutableStyle | ||
public interface ContextConfigurationIF { | ||
@Default | ||
default ExpressionStrategy getExpressionStrategy() { | ||
return new DefaultExpressionStrategy(); | ||
} | ||
|
||
@Nullable | ||
DynamicVariableResolver getDynamicVariableResolver(); | ||
|
||
@Default | ||
default boolean isValidationMode() { | ||
return false; | ||
} | ||
|
||
@Default | ||
default boolean isDeferredExecutionMode() { | ||
return false; | ||
} | ||
|
||
@Default | ||
default boolean isDeferLargeObjects() { | ||
return false; | ||
} | ||
|
||
@Default | ||
default boolean isThrowInterpreterErrors() { | ||
return false; | ||
} | ||
|
||
@Default | ||
default boolean isPartialMacroEvaluation() { | ||
return false; | ||
} | ||
|
||
@Default | ||
default boolean isUnwrapRawOverride() { | ||
return false; | ||
} | ||
} |
f13f7ae
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
what is f**k ContextConfiguration? how can i get it