Package com.google.inject.spi
Interface PrivateElements
-
- All Superinterfaces:
Element
public interface PrivateElements extends Element
A private collection of elements that are hidden from the enclosing injector or module by default. SeePrivateModule
for details.- Since:
- 2.0
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description List<Element>
getElements()
Returns the configuration information in this private environment.Set<Key<?>>
getExposedKeys()
Returns the unique exposed keys for these private elements.Object
getExposedSource(Key<?> key)
Returns an arbitrary object containing information about the "place" where this key was exposed.Injector
getInjector()
Returns the child injector that hosts these private elements, or null if the elements haven't been used to create an injector.-
Methods inherited from interface com.google.inject.spi.Element
acceptVisitor, applyTo, getSource
-
-
-
-
Method Detail
-
getElements
List<Element> getElements()
Returns the configuration information in this private environment.
-
getInjector
Injector getInjector()
Returns the child injector that hosts these private elements, or null if the elements haven't been used to create an injector.
-
getExposedKeys
Set<Key<?>> getExposedKeys()
Returns the unique exposed keys for these private elements.
-
getExposedSource
Object getExposedSource(Key<?> key)
Returns an arbitrary object containing information about the "place" where this key was exposed. Used by Guice in the production of descriptive error messages.Tools might specially handle types they know about;
StackTraceElement
is a good example. Tools should simply calltoString()
on the source object if the type is unfamiliar.- Parameters:
key
- one of the keys exposed by this module.
-
-