-
Notifications
You must be signed in to change notification settings - Fork 170
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Condense overrideable options in Context to ContextConfiguration
immutable
- Loading branch information
1 parent
444a9f4
commit 2f82d1c
Showing
3 changed files
with
91 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; | ||
} | ||
} |