|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.google.template.soy.shared.SoyGeneralOptions
public class SoyGeneralOptions
Compilation options applicable to the Soy frontend and/or to multiple Soy backends.
| Nested Class Summary | |
|---|---|
static class |
SoyGeneralOptions.CssHandlingScheme
Schemes for handling css commands. |
| Constructor Summary | |
|---|---|
SoyGeneralOptions()
|
|
| Method Summary | |
|---|---|
Boolean |
allowExternalCalls()
Returns whether to allow external calls (calls to undefined templates). |
SoyGeneralOptions |
clone()
|
com.google.common.collect.ImmutableMap<String,com.google.template.soy.data.restricted.PrimitiveData> |
getCompileTimeGlobals()
Returns the map from compile-time global name to value. |
SoyGeneralOptions.CssHandlingScheme |
getCssHandlingScheme()
Returns the scheme for handling css commands. |
void |
setAllowExternalCalls(boolean allowExternalCalls)
Sets whether to allow external calls (calls to undefined templates). |
void |
setCompileTimeGlobals(File compileTimeGlobalsFile)
Sets the file containing compile-time globals. |
void |
setCompileTimeGlobals(Map<String,?> compileTimeGlobalsMap)
Sets the map from compile-time global name to value. |
void |
setCompileTimeGlobals(URL compileTimeGlobalsResource)
Sets the resource file containing compile-time globals. |
void |
setCssHandlingScheme(SoyGeneralOptions.CssHandlingScheme cssHandlingScheme)
Sets the scheme for handling css commands. |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SoyGeneralOptions()
| Method Detail |
|---|
public void setAllowExternalCalls(boolean allowExternalCalls)
allowExternalCalls - The value to set.public Boolean allowExternalCalls()
public void setCssHandlingScheme(SoyGeneralOptions.CssHandlingScheme cssHandlingScheme)
css commands.
cssHandlingScheme - The css-handling scheme to set.public SoyGeneralOptions.CssHandlingScheme getCssHandlingScheme()
css commands.
public void setCompileTimeGlobals(Map<String,?> compileTimeGlobalsMap)
The values can be any of the Soy primitive types: null, boolean, integer, float (Java double), or string.
compileTimeGlobalsMap - Map from compile-time global name to value. The values can be
any of the Soy primitive types: null, boolean, integer, float (Java double), or string.
SoySyntaxException - If one of the values is not a valid
Soy primitive type.
public void setCompileTimeGlobals(File compileTimeGlobalsFile)
throws IOException
Each line of the file should have the format
<global_name> = <primitive_data>
where primitive_data is a valid Soy expression literal for a primitive type (null, boolean,
integer, float, or string). Empty lines and lines beginning with "//" are ignored. The file
should be encoded in UTF-8.
If you need to generate a file in this format from Java, consider using the utility
SoyUtils.generateCompileTimeGlobalsFile().
compileTimeGlobalsFile - The file containing compile-time globals.
IOException - If there is an error reading the compile-time globals file.
public void setCompileTimeGlobals(URL compileTimeGlobalsResource)
throws IOException
Each line of the file should have the format
<global_name> = <primitive_data>
where primitive_data is a valid Soy expression literal for a primitive type (null, boolean,
integer, float, or string). Empty lines and lines beginning with "//" are ignored. The file
should be encoded in UTF-8.
If you need to generate a file in this format from Java, consider using the utility
SoyUtils.generateCompileTimeGlobalsFile().
compileTimeGlobalsResource - The resource file containing compile-time globals.
IOException - If there is an error reading the compile-time globals file.public com.google.common.collect.ImmutableMap<String,com.google.template.soy.data.restricted.PrimitiveData> getCompileTimeGlobals()
public SoyGeneralOptions clone()
clone in class Object
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||