Sophie

Sophie

distrib > Mageia > 7 > x86_64 > by-pkgid > b3bdfe6d859a3d6920ff2c44b38e9a6f > files > 1967

saxon-manual-9.4.0.9-2.mga7.noarch.rpm

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<!--NewPage-->
<HTML>
<HEAD>
<!-- Generated by javadoc (build 1.6.0_18) on Fri Dec 09 20:48:13 GMT 2011 -->
<TITLE>
Optimizer
</TITLE>

<META NAME="date" CONTENT="2011-12-09">

<LINK REL ="stylesheet" TYPE="text/css" HREF="../../../../../stylesheet.css" TITLE="Style">

<SCRIPT type="text/javascript">
function windowTitle()
{
    if (location.href.indexOf('is-external=true') == -1) {
        parent.document.title="Optimizer";
    }
}
</SCRIPT>
<NOSCRIPT>
</NOSCRIPT>

</HEAD>

<BODY BGCOLOR="white" onload="windowTitle();">
<HR>


<!-- ========= START OF TOP NAVBAR ======= -->
<A NAME="navbar_top"><!-- --></A>
<A HREF="#skip-navbar_top" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.ContextItemType.html" title="class in net.sf.saxon.expr.parser"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../net/sf/saxon/expr/parser/PathMap.html" title="class in net.sf.saxon.expr.parser"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?net/sf/saxon/expr/parser/Optimizer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Optimizer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_top"></A>
<!-- ========= END OF TOP NAVBAR ========= -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
net.sf.saxon.expr.parser</FONT>
<BR>
Class Optimizer</H2>
<PRE>
<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">java.lang.Object</A>
  <IMG SRC="../../../../../resources/inherit.gif" ALT="extended by "><B>net.sf.saxon.expr.parser.Optimizer</B>
</PRE>
<DL>
<DT><B>All Implemented Interfaces:</B> <DD><A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DD>
</DL>
<DL>
<DT><B>Direct Known Subclasses:</B> <DD><A HREF="../../../../../com/saxonica/expr/ee/OptimizerEE.html" title="class in com.saxonica.expr.ee">OptimizerEE</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public class <B>Optimizer</B><DT>extends <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A><DT>implements <A HREF="http://download.oracle.com/javase/6/docs/api/java/io/Serializable.html?is-external=true" title="class or interface in java.io">Serializable</A></DL>
</PRE>

<P>
This class performs optimizations that vary between different versions of the Saxon product.
 The optimizer is obtained from the Saxon Configuration. This class is the version used in Saxon-B,
 which in most cases does no optimization at all: the methods are provided so that they can be
 overridden in Saxon-EE.
<P>

<P>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../serialized-form.html#net.sf.saxon.expr.parser.Optimizer">Serialized Form</A></DL>
<HR>

<P>
<!-- =========== FIELD SUMMARY =========== -->

<A NAME="field_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Field Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>protected &nbsp;<A HREF="../../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#config">config</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#FULL_OPTIMIZATION">FULL_OPTIMIZATION</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>static&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#NO_OPTIMIZATION">NO_OPTIMIZATION</A></B></CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</TD>
</TR>
</TABLE>
&nbsp;
<!-- ======== CONSTRUCTOR SUMMARY ======== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#Optimizer(net.sf.saxon.Configuration)">Optimizer</A></B>(<A HREF="../../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A>&nbsp;config)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create an Optimizer.</TD>
</TR>
</TABLE>
&nbsp;
<!-- ========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="2"><FONT SIZE="+2">
<B>Method Summary</B></FONT></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#compileToByteCode(net.sf.saxon.expr.Expression, java.lang.String, int)">compileToByteCode</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;expr,
                  <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;objectName,
                  int&nbsp;evaluationMethods)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate Java byte code for an expression</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#convertPathExpressionToKey(net.sf.saxon.expr.SlashExpression, net.sf.saxon.expr.parser.ExpressionVisitor)">convertPathExpressionToKey</A></B>(<A HREF="../../../../../net/sf/saxon/expr/SlashExpression.html" title="class in net.sf.saxon.expr">SlashExpression</A>&nbsp;pathExp,
                           <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor</A>&nbsp;visitor)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Examine a path expression to see whether it can be replaced by a call on the key() function;
 if so, generate an appropriate key definition and return the call on key().</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/FilterExpression.html" title="class in net.sf.saxon.expr">FilterExpression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#convertToFilterExpression(net.sf.saxon.expr.SlashExpression, net.sf.saxon.type.TypeHierarchy)">convertToFilterExpression</A></B>(<A HREF="../../../../../net/sf/saxon/expr/SlashExpression.html" title="class in net.sf.saxon.expr">SlashExpression</A>&nbsp;pathExp,
                          <A HREF="../../../../../net/sf/saxon/type/TypeHierarchy.html" title="class in net.sf.saxon.type">TypeHierarchy</A>&nbsp;th)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Convert a path expression such as a/b/c[predicate] into a filter expression
 of the form (a/b/c)[predicate].</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#extractGlobalVariables(net.sf.saxon.expr.Expression, net.sf.saxon.expr.parser.ExpressionVisitor, net.sf.saxon.expr.parser.PromotionOffer)">extractGlobalVariables</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;body,
                       <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor</A>&nbsp;visitor,
                       <A HREF="../../../../../net/sf/saxon/expr/parser/PromotionOffer.html" title="class in net.sf.saxon.expr.parser">PromotionOffer</A>&nbsp;offer)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Extract subexpressions from the body of a function that can be evaluated
 as global variables</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#generateMultithreadedInstruction(net.sf.saxon.expr.Expression)">generateMultithreadedInstruction</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;instruction)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate a multi-threaded version of an instruction.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#getConfiguration()">getConfiguration</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the Saxon configuration object</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#getOptimizationLevel()">getOptimizationLevel</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Get the optimization level</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;int</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#isIndexableFilter(net.sf.saxon.expr.Expression)">isIndexableFilter</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;filter)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Test whether a filter predicate is indexable.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;boolean</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#isVariableReplaceableByDot(net.sf.saxon.expr.Expression, net.sf.saxon.expr.Binding[])">isVariableReplaceableByDot</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;exp,
                           <A HREF="../../../../../net/sf/saxon/expr/Binding.html" title="interface in net.sf.saxon.expr">Binding</A>[]&nbsp;binding)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Determine whether it is possible to rearrange an expression so that all references to a given
 variable are replaced by a reference to ".".</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#makeCastableToList(net.sf.saxon.expr.Expression, net.sf.saxon.type.SchemaType, boolean)">makeCastableToList</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;operand,
                   <A HREF="../../../../../net/sf/saxon/type/SchemaType.html" title="interface in net.sf.saxon.type">SchemaType</A>&nbsp;targetType,
                   boolean&nbsp;allowsEmpty)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make an expression castable check to a union type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#makeCastableToUnion(net.sf.saxon.expr.Expression, net.sf.saxon.type.SchemaType, boolean)">makeCastableToUnion</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;operand,
                    <A HREF="../../../../../net/sf/saxon/type/SchemaType.html" title="interface in net.sf.saxon.type">SchemaType</A>&nbsp;targetType,
                    boolean&nbsp;allowsEmpty)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make an expression castable check to a union type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#makeCastToList(net.sf.saxon.expr.Expression, net.sf.saxon.type.SchemaType, boolean)">makeCastToList</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;operand,
               <A HREF="../../../../../net/sf/saxon/type/SchemaType.html" title="interface in net.sf.saxon.type">SchemaType</A>&nbsp;targetType,
               boolean&nbsp;allowsEmpty)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make an expression that casts to a list type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#makeCastToUnion(net.sf.saxon.expr.Expression, net.sf.saxon.type.SchemaType, boolean)">makeCastToUnion</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;operand,
                <A HREF="../../../../../net/sf/saxon/type/SchemaType.html" title="interface in net.sf.saxon.type">SchemaType</A>&nbsp;targetType,
                boolean&nbsp;allowsEmpty)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make an expression that casts to a union type.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#makeConditionalDocumentSorter(net.sf.saxon.expr.sort.DocumentSorter, net.sf.saxon.expr.SlashExpression)">makeConditionalDocumentSorter</A></B>(<A HREF="../../../../../net/sf/saxon/expr/sort/DocumentSorter.html" title="class in net.sf.saxon.expr.sort">DocumentSorter</A>&nbsp;sorter,
                              <A HREF="../../../../../net/sf/saxon/expr/SlashExpression.html" title="class in net.sf.saxon.expr">SlashExpression</A>&nbsp;path)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make a conditional document sorter.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#makeCopyOperationsExplicit(net.sf.saxon.expr.Expression, net.sf.saxon.expr.Expression)">makeCopyOperationsExplicit</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;parent,
                           <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;child)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In streaming mode, make the copy operation applied to subexpressions of a complex-content
 sequence constructor into explicit copy-of operations.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/om/ValueRepresentation.html" title="interface in net.sf.saxon.om">ValueRepresentation</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#makeIndexedValue(net.sf.saxon.om.SequenceIterator)">makeIndexedValue</A></B>(<A HREF="../../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A>&nbsp;iter)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Create an indexed value</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/trans/RuleTarget.html" title="interface in net.sf.saxon.trans">RuleTarget</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#makeInversion(net.sf.saxon.pattern.Pattern, net.sf.saxon.expr.instruct.Template, net.sf.saxon.pattern.NodeTest)">makeInversion</A></B>(<A HREF="../../../../../net/sf/saxon/pattern/Pattern.html" title="class in net.sf.saxon.pattern">Pattern</A>&nbsp;pattern,
              <A HREF="../../../../../net/sf/saxon/expr/instruct/Template.html" title="class in net.sf.saxon.expr.instruct">Template</A>&nbsp;template,
              <A HREF="../../../../../net/sf/saxon/pattern/NodeTest.html" title="class in net.sf.saxon.pattern">NodeTest</A>&nbsp;nodeTest)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Generate the inversion of the expression comprising the body of a template rules.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#makeOuterForExpression()">makeOuterForExpression</A></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make an OuterForExpression (Saxon-EE only)</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#makeStreamingApplyTemplates(net.sf.saxon.expr.instruct.ApplyTemplates)">makeStreamingApplyTemplates</A></B>(<A HREF="../../../../../net/sf/saxon/expr/instruct/ApplyTemplates.html" title="class in net.sf.saxon.expr.instruct">ApplyTemplates</A>&nbsp;inst)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Make a streaming applyTemplates instruction.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#optimizeCopy(net.sf.saxon.expr.Expression)">optimizeCopy</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;select)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Attempt to optimize a copy operation.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#optimizeForExpressionForStreaming(net.sf.saxon.expr.ForExpression)">optimizeForExpressionForStreaming</A></B>(<A HREF="../../../../../net/sf/saxon/expr/ForExpression.html" title="class in net.sf.saxon.expr">ForExpression</A>&nbsp;expr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In streaming mode, optimizer a ForExpression for streaming</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/BinaryExpression.html" title="class in net.sf.saxon.expr">BinaryExpression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#optimizeGeneralComparison(net.sf.saxon.expr.GeneralComparison, boolean)">optimizeGeneralComparison</A></B>(<A HREF="../../../../../net/sf/saxon/expr/GeneralComparison.html" title="class in net.sf.saxon.expr">GeneralComparison</A>&nbsp;gc,
                          boolean&nbsp;backwardsCompatible)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Simplify a GeneralComparison expression</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#optimizeQuantifiedExpressionForStreaming(net.sf.saxon.expr.QuantifiedExpression)">optimizeQuantifiedExpressionForStreaming</A></B>(<A HREF="../../../../../net/sf/saxon/expr/QuantifiedExpression.html" title="class in net.sf.saxon.expr">QuantifiedExpression</A>&nbsp;expr)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;In streaming mode, optimizer a QuantifiedExpression for streaming</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#promoteExpressionsToGlobal(net.sf.saxon.expr.Expression, net.sf.saxon.expr.parser.ExpressionVisitor)">promoteExpressionsToGlobal</A></B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;body,
                           <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor</A>&nbsp;visitor)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Identify expressions within a function or template body that can be promoted to be
 evaluated as global variables.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#setOptimizationLevel(int)">setOptimizationLevel</A></B>(int&nbsp;level)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Set the optimization level</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#trace(java.lang.String)">trace</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;message)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Trace optimization actions</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;void</CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#trace(java.lang.String, net.sf.saxon.expr.Expression)">trace</A></B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;message,
      <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;exp)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Trace optimization actions</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#tryIndexedFilter(net.sf.saxon.expr.FilterExpression, net.sf.saxon.expr.parser.ExpressionVisitor, boolean)">tryIndexedFilter</A></B>(<A HREF="../../../../../net/sf/saxon/expr/FilterExpression.html" title="class in net.sf.saxon.expr">FilterExpression</A>&nbsp;f,
                 <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor</A>&nbsp;visitor,
                 boolean&nbsp;indexFirstOperand)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try converting a filter expression to a call on the key function.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#tryInlineFunctionCall(net.sf.saxon.expr.UserFunctionCall, net.sf.saxon.expr.parser.ExpressionVisitor, net.sf.saxon.expr.parser.ExpressionVisitor.ContextItemType)">tryInlineFunctionCall</A></B>(<A HREF="../../../../../net/sf/saxon/expr/UserFunctionCall.html" title="class in net.sf.saxon.expr">UserFunctionCall</A>&nbsp;functionCall,
                      <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor</A>&nbsp;visitor,
                      <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.ContextItemType.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor.ContextItemType</A>&nbsp;contextItemType)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Replace a function call by the body of the function, assuming all conditions for inlining
 the function are satisfied</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../../../net/sf/saxon/expr/parser/Optimizer.html#trySwitch(net.sf.saxon.expr.instruct.Choose, net.sf.saxon.expr.StaticContext)">trySwitch</A></B>(<A HREF="../../../../../net/sf/saxon/expr/instruct/Choose.html" title="class in net.sf.saxon.expr.instruct">Choose</A>&nbsp;choose,
          <A HREF="../../../../../net/sf/saxon/expr/StaticContext.html" title="interface in net.sf.saxon.expr">StaticContext</A>&nbsp;env)</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Try to convert a Choose expression into a switch</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_java.lang.Object"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from class java.lang.<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/Object.html?is-external=true#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>

<!-- ============ FIELD DETAIL =========== -->

<A NAME="field_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Field Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="NO_OPTIMIZATION"><!-- --></A><H3>
NO_OPTIMIZATION</H3>
<PRE>
public static final int <B>NO_OPTIMIZATION</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.sf.saxon.expr.parser.Optimizer.NO_OPTIMIZATION">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="FULL_OPTIMIZATION"><!-- --></A><H3>
FULL_OPTIMIZATION</H3>
<PRE>
public static final int <B>FULL_OPTIMIZATION</B></PRE>
<DL>
<DL>
<DT><B>See Also:</B><DD><A HREF="../../../../../constant-values.html#net.sf.saxon.expr.parser.Optimizer.FULL_OPTIMIZATION">Constant Field Values</A></DL>
</DL>
<HR>

<A NAME="config"><!-- --></A><H3>
config</H3>
<PRE>
protected <A HREF="../../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A> <B>config</B></PRE>
<DL>
<DL>
</DL>
</DL>

<!-- ========= CONSTRUCTOR DETAIL ======== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="Optimizer(net.sf.saxon.Configuration)"><!-- --></A><H3>
Optimizer</H3>
<PRE>
public <B>Optimizer</B>(<A HREF="../../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A>&nbsp;config)</PRE>
<DL>
<DD>Create an Optimizer.
<P>
<DL>
<DT><B>Parameters:</B><DD><CODE>config</CODE> - the Saxon configuration</DL>
</DL>

<!-- ============ METHOD DETAIL ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor">
<TH ALIGN="left" COLSPAN="1"><FONT SIZE="+2">
<B>Method Detail</B></FONT></TH>
</TR>
</TABLE>

<A NAME="getConfiguration()"><!-- --></A><H3>
getConfiguration</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/Configuration.html" title="class in net.sf.saxon">Configuration</A> <B>getConfiguration</B>()</PRE>
<DL>
<DD>Get the Saxon configuration object
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the configuration</DL>
</DD>
</DL>
<HR>

<A NAME="setOptimizationLevel(int)"><!-- --></A><H3>
setOptimizationLevel</H3>
<PRE>
public void <B>setOptimizationLevel</B>(int&nbsp;level)</PRE>
<DL>
<DD>Set the optimization level
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>level</CODE> - the optimization level, between 0 (no optimization) and 10 (full optimization).
 Currently all values greater than zero have the same effect as full optimization</DL>
</DD>
</DL>
<HR>

<A NAME="getOptimizationLevel()"><!-- --></A><H3>
getOptimizationLevel</H3>
<PRE>
public int <B>getOptimizationLevel</B>()</PRE>
<DL>
<DD>Get the optimization level
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the optimization level, between 0 (no optimization) and 10 (full optimization).
 Currently all values greater than zero have the same effect as full optimization</DL>
</DD>
</DL>
<HR>

<A NAME="optimizeGeneralComparison(net.sf.saxon.expr.GeneralComparison, boolean)"><!-- --></A><H3>
optimizeGeneralComparison</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/BinaryExpression.html" title="class in net.sf.saxon.expr">BinaryExpression</A> <B>optimizeGeneralComparison</B>(<A HREF="../../../../../net/sf/saxon/expr/GeneralComparison.html" title="class in net.sf.saxon.expr">GeneralComparison</A>&nbsp;gc,
                                                  boolean&nbsp;backwardsCompatible)</PRE>
<DL>
<DD>Simplify a GeneralComparison expression
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>gc</CODE> - the GeneralComparison to be simplified<DD><CODE>backwardsCompatible</CODE> - true if in 1.0 compatibility mode
<DT><B>Returns:</B><DD>the simplified expression</DL>
</DD>
</DL>
<HR>

<A NAME="optimizeCopy(net.sf.saxon.expr.Expression)"><!-- --></A><H3>
optimizeCopy</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>optimizeCopy</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;select)
                        throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Attempt to optimize a copy operation. Return null if no optimization is possible.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>select</CODE> - the expression that selects the items to be copied
<DT><B>Returns:</B><DD>null if no optimization is possible, or an expression that does an optimized
 copy of these items otherwise
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="convertPathExpressionToKey(net.sf.saxon.expr.SlashExpression, net.sf.saxon.expr.parser.ExpressionVisitor)"><!-- --></A><H3>
convertPathExpressionToKey</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>convertPathExpressionToKey</B>(<A HREF="../../../../../net/sf/saxon/expr/SlashExpression.html" title="class in net.sf.saxon.expr">SlashExpression</A>&nbsp;pathExp,
                                             <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor</A>&nbsp;visitor)
                                      throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Examine a path expression to see whether it can be replaced by a call on the key() function;
 if so, generate an appropriate key definition and return the call on key(). If not, return null.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pathExp</CODE> - The path expression to be converted.<DD><CODE>visitor</CODE> - The expression visitor
<DT><B>Returns:</B><DD>the optimized expression, or null if no optimization is possible
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="tryIndexedFilter(net.sf.saxon.expr.FilterExpression, net.sf.saxon.expr.parser.ExpressionVisitor, boolean)"><!-- --></A><H3>
tryIndexedFilter</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>tryIndexedFilter</B>(<A HREF="../../../../../net/sf/saxon/expr/FilterExpression.html" title="class in net.sf.saxon.expr">FilterExpression</A>&nbsp;f,
                                   <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor</A>&nbsp;visitor,
                                   boolean&nbsp;indexFirstOperand)</PRE>
<DL>
<DD>Try converting a filter expression to a call on the key function. Return the supplied
 expression unchanged if not possible
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>f</CODE> - the filter expression to be converted<DD><CODE>visitor</CODE> - the expression visitor, which must be currently visiting the filter expression f<DD><CODE>indexFirstOperand</CODE> - true if the first operand of the filter comparison is to be indexed;
 false if it is the second operand
<DT><B>Returns:</B><DD>the optimized expression, or the unchanged expression f if no optimization is possible</DL>
</DD>
</DL>
<HR>

<A NAME="convertToFilterExpression(net.sf.saxon.expr.SlashExpression, net.sf.saxon.type.TypeHierarchy)"><!-- --></A><H3>
convertToFilterExpression</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/FilterExpression.html" title="class in net.sf.saxon.expr">FilterExpression</A> <B>convertToFilterExpression</B>(<A HREF="../../../../../net/sf/saxon/expr/SlashExpression.html" title="class in net.sf.saxon.expr">SlashExpression</A>&nbsp;pathExp,
                                                  <A HREF="../../../../../net/sf/saxon/type/TypeHierarchy.html" title="class in net.sf.saxon.type">TypeHierarchy</A>&nbsp;th)
                                           throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Convert a path expression such as a/b/c[predicate] into a filter expression
 of the form (a/b/c)[predicate]. This is possible whenever the predicate is non-positional.
 The conversion is useful in the case where the path expression appears inside a loop,
 where the predicate depends on the loop variable but a/b/c does not.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pathExp</CODE> - the path expression to be converted<DD><CODE>th</CODE> - the type hierarchy cache
<DT><B>Returns:</B><DD>the resulting filterexpression if conversion is possible, or null if not
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="isIndexableFilter(net.sf.saxon.expr.Expression)"><!-- --></A><H3>
isIndexableFilter</H3>
<PRE>
public int <B>isIndexableFilter</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;filter)</PRE>
<DL>
<DD>Test whether a filter predicate is indexable.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>filter</CODE> - the predicate expression
<DT><B>Returns:</B><DD>0 if not indexable; +1 if the predicate is in the form expression=value; -1 if it is in
 the form value=expression</DL>
</DD>
</DL>
<HR>

<A NAME="makeIndexedValue(net.sf.saxon.om.SequenceIterator)"><!-- --></A><H3>
makeIndexedValue</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/om/ValueRepresentation.html" title="interface in net.sf.saxon.om">ValueRepresentation</A> <B>makeIndexedValue</B>(<A HREF="../../../../../net/sf/saxon/om/SequenceIterator.html" title="interface in net.sf.saxon.om">SequenceIterator</A>&nbsp;iter)
                                     throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Create an indexed value
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>iter</CODE> - the iterator that delivers the sequence of values to be indexed
<DT><B>Returns:</B><DD>the indexed value
<DT><B>Throws:</B>
<DD><CODE>UnsupportedOperationException:</CODE> - this method should not be called in Saxon-B
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="isVariableReplaceableByDot(net.sf.saxon.expr.Expression, net.sf.saxon.expr.Binding[])"><!-- --></A><H3>
isVariableReplaceableByDot</H3>
<PRE>
public boolean <B>isVariableReplaceableByDot</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;exp,
                                          <A HREF="../../../../../net/sf/saxon/expr/Binding.html" title="interface in net.sf.saxon.expr">Binding</A>[]&nbsp;binding)</PRE>
<DL>
<DD>Determine whether it is possible to rearrange an expression so that all references to a given
 variable are replaced by a reference to ".". This is true of there are no references to the variable
 within a filter predicate or on the rhs of a "/" operator.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>exp</CODE> - the expression in question<DD><CODE>binding</CODE> - an array of bindings defining range variables; the method tests that there are no
 references to any of these variables within a predicate or on the rhs of "/"
<DT><B>Returns:</B><DD>true if the variable reference can be replaced</DL>
</DD>
</DL>
<HR>

<A NAME="makeConditionalDocumentSorter(net.sf.saxon.expr.sort.DocumentSorter, net.sf.saxon.expr.SlashExpression)"><!-- --></A><H3>
makeConditionalDocumentSorter</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>makeConditionalDocumentSorter</B>(<A HREF="../../../../../net/sf/saxon/expr/sort/DocumentSorter.html" title="class in net.sf.saxon.expr.sort">DocumentSorter</A>&nbsp;sorter,
                                                <A HREF="../../../../../net/sf/saxon/expr/SlashExpression.html" title="class in net.sf.saxon.expr">SlashExpression</A>&nbsp;path)</PRE>
<DL>
<DD>Make a conditional document sorter. This optimization is attempted
 when a DocumentSorter is wrapped around a path expression
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>sorter</CODE> - the document sorter<DD><CODE>path</CODE> - the path expression
<DT><B>Returns:</B><DD>the original sorter unchanged when no optimization is possible, which is always the
 case in Saxon-B</DL>
</DD>
</DL>
<HR>

<A NAME="tryInlineFunctionCall(net.sf.saxon.expr.UserFunctionCall, net.sf.saxon.expr.parser.ExpressionVisitor, net.sf.saxon.expr.parser.ExpressionVisitor.ContextItemType)"><!-- --></A><H3>
tryInlineFunctionCall</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>tryInlineFunctionCall</B>(<A HREF="../../../../../net/sf/saxon/expr/UserFunctionCall.html" title="class in net.sf.saxon.expr">UserFunctionCall</A>&nbsp;functionCall,
                                        <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor</A>&nbsp;visitor,
                                        <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.ContextItemType.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor.ContextItemType</A>&nbsp;contextItemType)</PRE>
<DL>
<DD>Replace a function call by the body of the function, assuming all conditions for inlining
 the function are satisfied
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>functionCall</CODE> - the functionCall expression<DD><CODE>visitor</CODE> - the expression visitor<DD><CODE>contextItemType</CODE> - the context item type
<DT><B>Returns:</B><DD>either the original expression unchanged, or an expression that consists of the inlined
 function body, with all function parameters bound as required. In Saxon-B, function inlining is
 not supported, so the original functionCall is always returned unchanged</DL>
</DD>
</DL>
<HR>

<A NAME="promoteExpressionsToGlobal(net.sf.saxon.expr.Expression, net.sf.saxon.expr.parser.ExpressionVisitor)"><!-- --></A><H3>
promoteExpressionsToGlobal</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>promoteExpressionsToGlobal</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;body,
                                             <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor</A>&nbsp;visitor)
                                      throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Identify expressions within a function or template body that can be promoted to be
 evaluated as global variables.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>body</CODE> - the body of the template or function<DD><CODE>visitor</CODE> - the expression visitor
<DT><B>Returns:</B><DD>the expression after subexpressions have been promoted to global variables; or null if
 nothing has changed
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="trySwitch(net.sf.saxon.expr.instruct.Choose, net.sf.saxon.expr.StaticContext)"><!-- --></A><H3>
trySwitch</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>trySwitch</B>(<A HREF="../../../../../net/sf/saxon/expr/instruct/Choose.html" title="class in net.sf.saxon.expr.instruct">Choose</A>&nbsp;choose,
                            <A HREF="../../../../../net/sf/saxon/expr/StaticContext.html" title="interface in net.sf.saxon.expr">StaticContext</A>&nbsp;env)</PRE>
<DL>
<DD>Try to convert a Choose expression into a switch
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>choose</CODE> - the Choose expression<DD><CODE>env</CODE> - the static context
<DT><B>Returns:</B><DD>the result of optimizing this (the original expression if no optimization was possible)</DL>
</DD>
</DL>
<HR>

<A NAME="extractGlobalVariables(net.sf.saxon.expr.Expression, net.sf.saxon.expr.parser.ExpressionVisitor, net.sf.saxon.expr.parser.PromotionOffer)"><!-- --></A><H3>
extractGlobalVariables</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>extractGlobalVariables</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;body,
                                         <A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.html" title="class in net.sf.saxon.expr.parser">ExpressionVisitor</A>&nbsp;visitor,
                                         <A HREF="../../../../../net/sf/saxon/expr/parser/PromotionOffer.html" title="class in net.sf.saxon.expr.parser">PromotionOffer</A>&nbsp;offer)
                                  throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Extract subexpressions from the body of a function that can be evaluated
 as global variables
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>body</CODE> - the body of the function<DD><CODE>offer</CODE> - The PromotionOffer. Will be marked to indicate whether any action was taken
<DT><B>Returns:</B><DD>a reference to the new global variable if a variable has been created, or null if not
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="makeStreamingApplyTemplates(net.sf.saxon.expr.instruct.ApplyTemplates)"><!-- --></A><H3>
makeStreamingApplyTemplates</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>makeStreamingApplyTemplates</B>(<A HREF="../../../../../net/sf/saxon/expr/instruct/ApplyTemplates.html" title="class in net.sf.saxon.expr.instruct">ApplyTemplates</A>&nbsp;inst)
                                       throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Make a streaming applyTemplates instruction. Supported in Saxon-EE only
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>inst</CODE> - the unoptimized applyTemplates instruction
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="makeInversion(net.sf.saxon.pattern.Pattern, net.sf.saxon.expr.instruct.Template, net.sf.saxon.pattern.NodeTest)"><!-- --></A><H3>
makeInversion</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/trans/RuleTarget.html" title="interface in net.sf.saxon.trans">RuleTarget</A> <B>makeInversion</B>(<A HREF="../../../../../net/sf/saxon/pattern/Pattern.html" title="class in net.sf.saxon.pattern">Pattern</A>&nbsp;pattern,
                                <A HREF="../../../../../net/sf/saxon/expr/instruct/Template.html" title="class in net.sf.saxon.expr.instruct">Template</A>&nbsp;template,
                                <A HREF="../../../../../net/sf/saxon/pattern/NodeTest.html" title="class in net.sf.saxon.pattern">NodeTest</A>&nbsp;nodeTest)
                         throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>Generate the inversion of the expression comprising the body of a template rules.
 Supported in Saxon-EE only
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>pattern</CODE> - the match pattern of this template rule<DD><CODE>template</CODE> - the template to be inverted<DD><CODE>nodeTest</CODE> - the static item type of the context node of the template
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="makeCopyOperationsExplicit(net.sf.saxon.expr.Expression, net.sf.saxon.expr.Expression)"><!-- --></A><H3>
makeCopyOperationsExplicit</H3>
<PRE>
public void <B>makeCopyOperationsExplicit</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;parent,
                                       <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;child)
                                throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>In streaming mode, make the copy operation applied to subexpressions of a complex-content
 sequence constructor into explicit copy-of operations.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="makeCastToUnion(net.sf.saxon.expr.Expression, net.sf.saxon.type.SchemaType, boolean)"><!-- --></A><H3>
makeCastToUnion</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>makeCastToUnion</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;operand,
                                  <A HREF="../../../../../net/sf/saxon/type/SchemaType.html" title="interface in net.sf.saxon.type">SchemaType</A>&nbsp;targetType,
                                  boolean&nbsp;allowsEmpty)</PRE>
<DL>
<DD>Make an expression that casts to a union type. Not available in Saxon-HE
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="makeCastToList(net.sf.saxon.expr.Expression, net.sf.saxon.type.SchemaType, boolean)"><!-- --></A><H3>
makeCastToList</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>makeCastToList</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;operand,
                                 <A HREF="../../../../../net/sf/saxon/type/SchemaType.html" title="interface in net.sf.saxon.type">SchemaType</A>&nbsp;targetType,
                                 boolean&nbsp;allowsEmpty)</PRE>
<DL>
<DD>Make an expression that casts to a list type. Not available in Saxon-HE
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="makeCastableToUnion(net.sf.saxon.expr.Expression, net.sf.saxon.type.SchemaType, boolean)"><!-- --></A><H3>
makeCastableToUnion</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>makeCastableToUnion</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;operand,
                                      <A HREF="../../../../../net/sf/saxon/type/SchemaType.html" title="interface in net.sf.saxon.type">SchemaType</A>&nbsp;targetType,
                                      boolean&nbsp;allowsEmpty)</PRE>
<DL>
<DD>Make an expression castable check to a union type. Not available in Saxon-HE
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="makeCastableToList(net.sf.saxon.expr.Expression, net.sf.saxon.type.SchemaType, boolean)"><!-- --></A><H3>
makeCastableToList</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>makeCastableToList</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;operand,
                                     <A HREF="../../../../../net/sf/saxon/type/SchemaType.html" title="interface in net.sf.saxon.type">SchemaType</A>&nbsp;targetType,
                                     boolean&nbsp;allowsEmpty)</PRE>
<DL>
<DD>Make an expression castable check to a union type. Not available in Saxon-HE
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>

<A NAME="optimizeForExpressionForStreaming(net.sf.saxon.expr.ForExpression)"><!-- --></A><H3>
optimizeForExpressionForStreaming</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>optimizeForExpressionForStreaming</B>(<A HREF="../../../../../net/sf/saxon/expr/ForExpression.html" title="class in net.sf.saxon.expr">ForExpression</A>&nbsp;expr)
                                             throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>In streaming mode, optimizer a ForExpression for streaming
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expr</CODE> - the expression to be optimized
<DT><B>Returns:</B><DD>the optimized expression
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="makeOuterForExpression()"><!-- --></A><H3>
makeOuterForExpression</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>makeOuterForExpression</B>()</PRE>
<DL>
<DD>Make an OuterForExpression (Saxon-EE only)
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>

<DT><B>Returns:</B><DD>the new expression</DL>
</DD>
</DL>
<HR>

<A NAME="optimizeQuantifiedExpressionForStreaming(net.sf.saxon.expr.QuantifiedExpression)"><!-- --></A><H3>
optimizeQuantifiedExpressionForStreaming</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>optimizeQuantifiedExpressionForStreaming</B>(<A HREF="../../../../../net/sf/saxon/expr/QuantifiedExpression.html" title="class in net.sf.saxon.expr">QuantifiedExpression</A>&nbsp;expr)
                                                    throws <A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></PRE>
<DL>
<DD>In streaming mode, optimizer a QuantifiedExpression for streaming
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expr</CODE> - the expression to be optimized
<DT><B>Returns:</B><DD>the optimized expression
<DT><B>Throws:</B>
<DD><CODE><A HREF="../../../../../net/sf/saxon/trans/XPathException.html" title="class in net.sf.saxon.trans">XPathException</A></CODE></DL>
</DD>
</DL>
<HR>

<A NAME="generateMultithreadedInstruction(net.sf.saxon.expr.Expression)"><!-- --></A><H3>
generateMultithreadedInstruction</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>generateMultithreadedInstruction</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;instruction)</PRE>
<DL>
<DD>Generate a multi-threaded version of an instruction.
 Supported in Saxon-EE only; ignored with no action in Saxon-HE and Saxon-PE
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>instruction</CODE> - the instruction to be multi-threaded
<DT><B>Returns:</B><DD>the multi-threaded version of the instruction</DL>
</DD>
</DL>
<HR>

<A NAME="compileToByteCode(net.sf.saxon.expr.Expression, java.lang.String, int)"><!-- --></A><H3>
compileToByteCode</H3>
<PRE>
public <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A> <B>compileToByteCode</B>(<A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;expr,
                                    <A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;objectName,
                                    int&nbsp;evaluationMethods)</PRE>
<DL>
<DD>Generate Java byte code for an expression
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>expr</CODE> - the expression to be compiled<DD><CODE>objectName</CODE> - the name of the object (e.g. function) being compiled<DD><CODE>evaluationMethods</CODE> - The evaluation modes for which code is generated. Currently a subset of
 <A HREF="../../../../../net/sf/saxon/expr/Expression.html#PROCESS_METHOD"><CODE>Expression.PROCESS_METHOD</CODE></A>, <A HREF="../../../../../net/sf/saxon/expr/Expression.html#ITERATE_METHOD"><CODE>Expression.ITERATE_METHOD</CODE></A>. If no code is generated for
 a given evaluation method, the fallback implementation from the superclass is used.
<DT><B>Returns:</B><DD>the compiled expression if possible, or null if compilation is not possible</DL>
</DD>
</DL>
<HR>

<A NAME="trace(java.lang.String, net.sf.saxon.expr.Expression)"><!-- --></A><H3>
trace</H3>
<PRE>
public void <B>trace</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;message,
                  <A HREF="../../../../../net/sf/saxon/expr/Expression.html" title="class in net.sf.saxon.expr">Expression</A>&nbsp;exp)</PRE>
<DL>
<DD>Trace optimization actions
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>message</CODE> - the message to be displayed<DD><CODE>exp</CODE> - the expression after being rewritten</DL>
</DD>
</DL>
<HR>

<A NAME="trace(java.lang.String)"><!-- --></A><H3>
trace</H3>
<PRE>
public void <B>trace</B>(<A HREF="http://download.oracle.com/javase/6/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</A>&nbsp;message)</PRE>
<DL>
<DD>Trace optimization actions
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>message</CODE> - the message to be displayed</DL>
</DD>
</DL>
<!-- ========= END OF CLASS DATA ========= -->
<HR>


<!-- ======= START OF BOTTOM NAVBAR ====== -->
<A NAME="navbar_bottom"><!-- --></A>
<A HREF="#skip-navbar_bottom" title="Skip navigation links"></A>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0" SUMMARY="">
<TR>
<TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1">
<A NAME="navbar_bottom_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3" SUMMARY="">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../overview-summary.html"><FONT CLASS="NavBarFont1"><B>Overview</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-summary.html"><FONT CLASS="NavBarFont1"><B>Package</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> &nbsp;<FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="package-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A>&nbsp;</TD>
  <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1">    <A HREF="../../../../../help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
</EM>
</TD>
</TR>

<TR>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
&nbsp;<A HREF="../../../../../net/sf/saxon/expr/parser/ExpressionVisitor.ContextItemType.html" title="class in net.sf.saxon.expr.parser"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../../../net/sf/saxon/expr/parser/PathMap.html" title="class in net.sf.saxon.expr.parser"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
  <A HREF="../../../../../index.html?net/sf/saxon/expr/parser/Optimizer.html" target="_top"><B>FRAMES</B></A>  &nbsp;
&nbsp;<A HREF="Optimizer.html" target="_top"><B>NO FRAMES</B></A>  &nbsp;
&nbsp;<SCRIPT type="text/javascript">
  <!--
  if(window==top) {
    document.writeln('<A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>');
  }
  //-->
</SCRIPT>
<NOSCRIPT>
  <A HREF="../../../../../allclasses-noframe.html"><B>All Classes</B></A>
</NOSCRIPT>


</FONT></TD>
</TR>
<TR>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
  SUMMARY:&nbsp;NESTED&nbsp;|&nbsp;<A HREF="#field_summary">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;<A HREF="#field_detail">FIELD</A>&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->

<HR>
Copyright (c) 2004-2011 Saxonica Limited. All rights reserved.
</BODY>
</HTML>