blob: 1c6536054b838d389bccfaca1835b17716d35410 [file] [log] [blame]
<!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_07) on Tue May 19 10:54:03 PDT 2009 -->
<TITLE>
PrivateBinder (Guice 2.0 API)
</TITLE>
<META NAME="date" CONTENT="2009-05-19">
<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="PrivateBinder (Guice 2.0 API)";
}
}
</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="../../../com/google/inject/OutOfScopeException.html" title="class in com.google.inject"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/google/inject/PrivateModule.html" title="class in com.google.inject"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/google/inject/PrivateBinder.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="PrivateBinder.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&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">
com.google.inject</FONT>
<BR>
Interface PrivateBinder</H2>
<DL>
<DT><B>All Superinterfaces:</B> <DD><A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject">Binder</A></DD>
</DL>
<HR>
<DL>
<DT><PRE>public interface <B>PrivateBinder</B><DT>extends <A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject">Binder</A></DL>
</PRE>
<P>
Returns a binder whose configuration information is hidden from its environment by default. See
<A HREF="../../../com/google/inject/PrivateModule.html" title="class in com.google.inject"><CODE>PrivateModule</CODE></A> for details.
<P>
<P>
<DL>
<DT><B>Since:</B></DT>
<DD>2.0</DD>
</DL>
<HR>
<P>
<!-- ========== 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="../../../com/google/inject/binder/AnnotatedElementBuilder.html" title="interface in com.google.inject.binder">AnnotatedElementBuilder</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/PrivateBinder.html#expose(java.lang.Class)">expose</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&nbsp;type)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes a binding for <code>type</code> available to the enclosing environment.</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="../../../com/google/inject/PrivateBinder.html#expose(com.google.inject.Key)">expose</A></B>(<A HREF="../../../com/google/inject/Key.html" title="class in com.google.inject">Key</A>&lt;?&gt;&nbsp;key)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes the binding for <code>key</code> available to the enclosing environment</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/inject/binder/AnnotatedElementBuilder.html" title="interface in com.google.inject.binder">AnnotatedElementBuilder</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/PrivateBinder.html#expose(com.google.inject.TypeLiteral)">expose</A></B>(<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;?&gt;&nbsp;type)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Makes a binding for <code>type</code> available to the enclosing environment.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/inject/PrivateBinder.html" title="interface in com.google.inject">PrivateBinder</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/PrivateBinder.html#skipSources(java.lang.Class...)">skipSources</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>...&nbsp;classesToSkip)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a binder that skips <code>classesToSkip</code> when identify the
calling code.</TD>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>&nbsp;<A HREF="../../../com/google/inject/PrivateBinder.html" title="interface in com.google.inject">PrivateBinder</A></CODE></FONT></TD>
<TD><CODE><B><A HREF="../../../com/google/inject/PrivateBinder.html#withSource(java.lang.Object)">withSource</A></B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;source)</CODE>
<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns a binder that uses <code>source</code> as the reference location for
configuration errors.</TD>
</TR>
</TABLE>
&nbsp;<A NAME="methods_inherited_from_class_com.google.inject.Binder"><!-- --></A>
<TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY="">
<TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor">
<TH ALIGN="left"><B>Methods inherited from interface com.google.inject.<A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject">Binder</A></B></TH>
</TR>
<TR BGCOLOR="white" CLASS="TableRowColor">
<TD><CODE><A HREF="../../../com/google/inject/Binder.html#addError(com.google.inject.spi.Message)">addError</A>, <A HREF="../../../com/google/inject/Binder.html#addError(java.lang.String, java.lang.Object...)">addError</A>, <A HREF="../../../com/google/inject/Binder.html#addError(java.lang.Throwable)">addError</A>, <A HREF="../../../com/google/inject/Binder.html#bind(java.lang.Class)">bind</A>, <A HREF="../../../com/google/inject/Binder.html#bind(com.google.inject.Key)">bind</A>, <A HREF="../../../com/google/inject/Binder.html#bind(com.google.inject.TypeLiteral)">bind</A>, <A HREF="../../../com/google/inject/Binder.html#bindConstant()">bindConstant</A>, <A HREF="../../../com/google/inject/Binder.html#bindInterceptor(com.google.inject.matcher.Matcher, com.google.inject.matcher.Matcher, org.aopalliance.intercept.MethodInterceptor...)">bindInterceptor</A>, <A HREF="../../../com/google/inject/Binder.html#bindListener(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeListener)">bindListener</A>, <A HREF="../../../com/google/inject/Binder.html#bindScope(java.lang.Class, com.google.inject.Scope)">bindScope</A>, <A HREF="../../../com/google/inject/Binder.html#convertToTypes(com.google.inject.matcher.Matcher, com.google.inject.spi.TypeConverter)">convertToTypes</A>, <A HREF="../../../com/google/inject/Binder.html#currentStage()">currentStage</A>, <A HREF="../../../com/google/inject/Binder.html#getMembersInjector(java.lang.Class)">getMembersInjector</A>, <A HREF="../../../com/google/inject/Binder.html#getMembersInjector(com.google.inject.TypeLiteral)">getMembersInjector</A>, <A HREF="../../../com/google/inject/Binder.html#getProvider(java.lang.Class)">getProvider</A>, <A HREF="../../../com/google/inject/Binder.html#getProvider(com.google.inject.Key)">getProvider</A>, <A HREF="../../../com/google/inject/Binder.html#install(com.google.inject.Module)">install</A>, <A HREF="../../../com/google/inject/Binder.html#newPrivateBinder()">newPrivateBinder</A>, <A HREF="../../../com/google/inject/Binder.html#requestInjection(java.lang.Object)">requestInjection</A>, <A HREF="../../../com/google/inject/Binder.html#requestInjection(com.google.inject.TypeLiteral, T)">requestInjection</A>, <A HREF="../../../com/google/inject/Binder.html#requestStaticInjection(java.lang.Class...)">requestStaticInjection</A></CODE></TD>
</TR>
</TABLE>
&nbsp;
<P>
<!-- ============ 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="expose(com.google.inject.Key)"><!-- --></A><H3>
expose</H3>
<PRE>
void <B>expose</B>(<A HREF="../../../com/google/inject/Key.html" title="class in com.google.inject">Key</A>&lt;?&gt;&nbsp;key)</PRE>
<DL>
<DD>Makes the binding for <code>key</code> available to the enclosing environment
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="expose(java.lang.Class)"><!-- --></A><H3>
expose</H3>
<PRE>
<A HREF="../../../com/google/inject/binder/AnnotatedElementBuilder.html" title="interface in com.google.inject.binder">AnnotatedElementBuilder</A> <B>expose</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>&lt;?&gt;&nbsp;type)</PRE>
<DL>
<DD>Makes a binding for <code>type</code> available to the enclosing environment. Use <A HREF="../../../com/google/inject/binder/AnnotatedElementBuilder.html#annotatedWith(java.lang.Class)"><CODE>annotatedWith()</CODE></A> to expose <code>type</code> with a
binding annotation.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="expose(com.google.inject.TypeLiteral)"><!-- --></A><H3>
expose</H3>
<PRE>
<A HREF="../../../com/google/inject/binder/AnnotatedElementBuilder.html" title="interface in com.google.inject.binder">AnnotatedElementBuilder</A> <B>expose</B>(<A HREF="../../../com/google/inject/TypeLiteral.html" title="class in com.google.inject">TypeLiteral</A>&lt;?&gt;&nbsp;type)</PRE>
<DL>
<DD>Makes a binding for <code>type</code> available to the enclosing environment. Use <A HREF="../../../com/google/inject/binder/AnnotatedElementBuilder.html#annotatedWith(java.lang.Class)"><CODE>annotatedWith()</CODE></A> to expose <code>type</code> with a
binding annotation.
<P>
<DD><DL>
</DL>
</DD>
<DD><DL>
</DL>
</DD>
</DL>
<HR>
<A NAME="withSource(java.lang.Object)"><!-- --></A><H3>
withSource</H3>
<PRE>
<A HREF="../../../com/google/inject/PrivateBinder.html" title="interface in com.google.inject">PrivateBinder</A> <B>withSource</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true" title="class or interface in java.lang">Object</A>&nbsp;source)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../com/google/inject/Binder.html#withSource(java.lang.Object)">Binder</A></CODE></B></DD>
<DD>Returns a binder that uses <code>source</code> as the reference location for
configuration errors. This is typically a <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StackTraceElement.html?is-external=true" title="class or interface in java.lang"><CODE>StackTraceElement</CODE></A>
for <code>.java</code> source but it could any binding source, such as the
path to a <code>.properties</code> file.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/google/inject/Binder.html#withSource(java.lang.Object)">withSource</A></CODE> in interface <CODE><A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject">Binder</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>source</CODE> - any object representing the source location and has a
concise <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Object.html?is-external=true#toString()" title="class or interface in java.lang"><CODE>toString()</CODE></A> value
<DT><B>Returns:</B><DD>a binder that shares its configuration with this binder</DL>
</DD>
</DL>
<HR>
<A NAME="skipSources(java.lang.Class...)"><!-- --></A><H3>
skipSources</H3>
<PRE>
<A HREF="../../../com/google/inject/PrivateBinder.html" title="interface in com.google.inject">PrivateBinder</A> <B>skipSources</B>(<A HREF="http://java.sun.com/javase/6/docs/api/java/lang/Class.html?is-external=true" title="class or interface in java.lang">Class</A>...&nbsp;classesToSkip)</PRE>
<DL>
<DD><B>Description copied from interface: <CODE><A HREF="../../../com/google/inject/Binder.html#skipSources(java.lang.Class...)">Binder</A></CODE></B></DD>
<DD>Returns a binder that skips <code>classesToSkip</code> when identify the
calling code. The caller's <A HREF="http://java.sun.com/javase/6/docs/api/java/lang/StackTraceElement.html?is-external=true" title="class or interface in java.lang"><CODE>StackTraceElement</CODE></A> is used to locate
the source of configuration errors.
<P>
<DD><DL>
<DT><B>Specified by:</B><DD><CODE><A HREF="../../../com/google/inject/Binder.html#skipSources(java.lang.Class...)">skipSources</A></CODE> in interface <CODE><A HREF="../../../com/google/inject/Binder.html" title="interface in com.google.inject">Binder</A></CODE></DL>
</DD>
<DD><DL>
<DT><B>Parameters:</B><DD><CODE>classesToSkip</CODE> - library classes that create bindings on behalf of
their clients.
<DT><B>Returns:</B><DD>a binder that shares its configuration with this binder.</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="../../../com/google/inject/OutOfScopeException.html" title="class in com.google.inject"><B>PREV CLASS</B></A>&nbsp;
&nbsp;<A HREF="../../../com/google/inject/PrivateModule.html" title="class in com.google.inject"><B>NEXT CLASS</B></A></FONT></TD>
<TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2">
<A HREF="../../../index.html?com/google/inject/PrivateBinder.html" target="_top"><B>FRAMES</B></A> &nbsp;
&nbsp;<A HREF="PrivateBinder.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;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL:&nbsp;FIELD&nbsp;|&nbsp;CONSTR&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<A NAME="skip-navbar_bottom"></A>
<!-- ======== END OF BOTTOM NAVBAR ======= -->
<HR>
</BODY>
</HTML>