## Uses of Class
freemarker.core.Environment

Packages that use Environment
freemarker.cache: Template loading and caching.
freemarker.core: The seldom used or advanced parts of the fundamental FreeMarker API, compared to `freemarker.template`.
freemarker.ext.servlet: Servlet for legacy "Model 2" frameworks that allows using FreeMarker templates instead of JSP as the MVC View (see in the Manual).
freemarker.template: The fundamental, most commonly used API-s of FreeMarker; start with `Configuration` (see also the Getting Stared in the Manual.)
freemarker.template.utility: Various classes used by core FreeMarker code but might be useful outside of it too.

### Uses of Environment in freemarker.cache

Methods in freemarker.cache with parameters of type Environment
`static String` TemplateCache.`getFullTemplatePath(Environment env, String baseName, String targetName)` Deprecated. Use `toFullTemplateName(String, String)` instead, as that can throw `MalformedTemplateNameException`, and is on a more logical place anyway.

### Uses of Environment in freemarker.core

Methods in freemarker.core that return Environment
`static Environment` Environment.`getCurrentEnvironment()` Retrieves the environment object associated with the current thread, or `null` if there's no template processing going on in this thread.
`protected Environment` Configurable.`getEnvironment()`

Methods in freemarker.core with parameters of type Environment
`protected void` Configurable.`doAutoImportsAndIncludes(Environment env)` Executes the auto-imports and auto-includes for the main template of this environment.
`Object` CustomAttribute.`get(Environment env)` Gets the attribute from the appropriate scope that's accessible through the specified `Environment`.
`abstract TemplateDateFormat` TemplateDateFormatFactory.`get(String params, int dateType, Locale locale, TimeZone timeZone, boolean zonelessInput, Environment env)` Returns a formatter for the given parameters.
`TemplateDateFormat` AliasTemplateDateFormatFactory.`get(String params, int dateType, Locale locale, TimeZone timeZone, boolean zonelessInput, Environment env)`
`abstract TemplateNumberFormat` TemplateNumberFormatFactory.`get(String params, Locale locale, Environment env)` Returns a formatter for the given parameters.
`TemplateNumberFormat` AliasTemplateNumberFormatFactory.`get(String params, Locale locale, Environment env)`
`Class` TemplateClassResolver.`resolve(String className, Environment env, Template template)` Gets a `Class` based on the class name.
`Class` OptInTemplateClassResolver.`resolve(String className, Environment env, Template template)`
`void` CustomAttribute.`set(Object value, Environment env)` Sets the attribute inside the appropriate scope that's accessible through the specified `Environment`.

Constructors in freemarker.core with parameters of type Environment
Constructor and Description
`InvalidReferenceException(Environment env)` Creates and invalid reference exception that contains no information about what was missing or null.
`InvalidReferenceException(String description, Environment env)` Creates and invalid reference exception that contains no programmatically extractable information about the blamed expression.
`NonBooleanException(Environment env)`
`NonBooleanException(String description, Environment env)`
`NonDateException(Environment env)`
`NonDateException(String description, Environment env)`
`NonExtendedHashException(Environment env)`
`NonExtendedHashException(String description, Environment env)`
`NonHashException(Environment env)`
`NonHashException(String description, Environment env)`
`NonMarkupOutputException(Environment env)`
`NonMarkupOutputException(String description, Environment env)`
`NonMethodException(Environment env)`
`NonMethodException(String description, Environment env)`
`NonNodeException(Environment env)`
`NonNodeException(String description, Environment env)`
`NonNumericalException(Environment env)`
`NonNumericalException(String description, Environment env)`
`NonSequenceException(Environment env)`
`NonSequenceException(String description, Environment env)`
`NonSequenceOrCollectionException(Environment env)`
`NonSequenceOrCollectionException(String description, Environment env)`
`NonStringException(Environment env)`
`NonStringException(String description, Environment env)`
`NonStringOrTemplateOutputException(Environment env)`
`NonStringOrTemplateOutputException(String description, Environment env)`
`UnexpectedTypeException(Environment env, String description)`

### Uses of Environment in freemarker.ext.servlet

Methods in freemarker.ext.servlet with parameters of type Environment
`void` IncludePage.`execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body)`
`protected void` FreemarkerServlet.`processEnvironment(Environment env, javax.servlet.http.HttpServletRequest request, javax.servlet.http.HttpServletResponse response)` This is the method that actually executes the template.

### Uses of Environment in freemarker.template

Methods in freemarker.template that return Environment
`Environment` Template.`createProcessingEnvironment(Object dataModel, Writer out)` Same as `createProcessingEnvironment(dataModel, out, null)`.
`Environment` Template.`createProcessingEnvironment(Object dataModel, Writer out, ObjectWrapper wrapper)` Creates a `Environment` object, using this template, the data-model provided as parameter.
`Environment` TemplateException.`getEnvironment()`

Methods in freemarker.template with parameters of type Environment
`protected void` Configuration.`doAutoImportsAndIncludes(Environment env)`
`void` TemplateDirectiveModel.`execute(Environment env, Map params, TemplateModel[] loopVars, TemplateDirectiveBody body)` Executes this user-defined directive; called by FreeMarker when the user-defined directive is called in the template.
`void` TemplateExceptionHandler.`handleTemplateException(TemplateException te, Environment env, Writer out)` Method called after a `TemplateException` was raised inside a template.

Constructors in freemarker.template with parameters of type Environment
Constructor and Description
`TemplateException(Environment env)` Constructs a TemplateException with no specified detail message or underlying cause.
`TemplateException(Exception cause, Environment env)` The same as `TemplateException.TemplateException(Throwable, Environment)`; it's exists only for binary backward-compatibility.
`TemplateException(String description, Environment env)` Constructs a TemplateException with the given detail message, but no underlying cause exception.
`TemplateException(String description, Exception cause, Environment env)` The same as `TemplateException.TemplateException(String, Throwable, Environment)`; it's exists only for binary backward-compatibility.
`TemplateException(String description, Throwable cause, Environment env)` Constructs a TemplateException with both a description of the error that occurred and the underlying Exception that caused this exception to be raised.
`TemplateException(Throwable cause, Environment env)` Constructs a TemplateException with the given underlying Exception, but no detail message.
`TemplateException(Throwable cause, Environment env, freemarker.core.Expression blamedExpr, freemarker.core._ErrorDescriptionBuilder descriptionBuilder)` Don't use this; this is to be used internally by FreeMarker.
`TemplateModelException(Throwable cause, Environment env, freemarker.core._ErrorDescriptionBuilder descriptionBuilder, boolean preventAmbiguity)` Don't use this; this is to be used internally by FreeMarker.
`TemplateModelException(Throwable cause, Environment env, String description, boolean preventAmbiguity)` Don't use this; this is to be used internally by FreeMarker.

### Uses of Environment in freemarker.template.utility

Methods in freemarker.template.utility with parameters of type Environment
`static boolean` StringUtil.`matchesName(String qname, String nodeName, String nsURI, Environment env)`