com.google.inject.spi
Class DefaultElementVisitor<V>

java.lang.Object
  extended by com.google.inject.spi.DefaultElementVisitor<V>
Type Parameters:
V - any type to be returned by the visit method. Use Void with return null if no return type is needed.
All Implemented Interfaces:
ElementVisitor<V>

public abstract class DefaultElementVisitor<V>
extends Object
implements ElementVisitor<V>

No-op visitor for subclassing. All interface methods simply delegate to visitElement(Element), returning its result.

Since:
2.0

Constructor Summary
DefaultElementVisitor()
           
 
Method Summary
<T> V
visitBinding(Binding<T> command)
          Visit a mapping from a key (type and optional annotation) to the strategy for getting instances of the type.
protected  V visitElement(Element element)
          Visit element and return a result.
 V visitInjectionRequest(InjectionRequest command)
          Visit a request to inject the instance fields and methods of an instance.
 V visitInterceptorBinding(InterceptorBinding command)
          Visit a registration of interceptors for matching methods of matching classes.
 V visitMessage(Message message)
          Visit an error message and the context in which it occured.
<T> V
visitProviderLookup(ProviderLookup<T> command)
          Visit a lookup of the provider for a type.
 V visitScopeBinding(ScopeBinding command)
          Visit a registration of a scope annotation with the scope that implements it.
 V visitStaticInjectionRequest(StaticInjectionRequest command)
          Visit a request to inject the static fields and methods of type.
 V visitTypeConverterBinding(TypeConverterBinding command)
          Visit a registration of type converters for matching target types.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DefaultElementVisitor

public DefaultElementVisitor()
Method Detail

visitElement

protected V visitElement(Element element)
Visit element and return a result.


visitMessage

public V visitMessage(Message message)
Description copied from interface: ElementVisitor
Visit an error message and the context in which it occured.

Specified by:
visitMessage in interface ElementVisitor<V>

visitBinding

public <T> V visitBinding(Binding<T> command)
Description copied from interface: ElementVisitor
Visit a mapping from a key (type and optional annotation) to the strategy for getting instances of the type.

Specified by:
visitBinding in interface ElementVisitor<V>

visitInterceptorBinding

public V visitInterceptorBinding(InterceptorBinding command)
Description copied from interface: ElementVisitor
Visit a registration of interceptors for matching methods of matching classes.

Specified by:
visitInterceptorBinding in interface ElementVisitor<V>

visitScopeBinding

public V visitScopeBinding(ScopeBinding command)
Description copied from interface: ElementVisitor
Visit a registration of a scope annotation with the scope that implements it.

Specified by:
visitScopeBinding in interface ElementVisitor<V>

visitTypeConverterBinding

public V visitTypeConverterBinding(TypeConverterBinding command)
Description copied from interface: ElementVisitor
Visit a registration of type converters for matching target types.

Specified by:
visitTypeConverterBinding in interface ElementVisitor<V>

visitProviderLookup

public <T> V visitProviderLookup(ProviderLookup<T> command)
Description copied from interface: ElementVisitor
Visit a lookup of the provider for a type.

Specified by:
visitProviderLookup in interface ElementVisitor<V>

visitInjectionRequest

public V visitInjectionRequest(InjectionRequest command)
Description copied from interface: ElementVisitor
Visit a request to inject the instance fields and methods of an instance.

Specified by:
visitInjectionRequest in interface ElementVisitor<V>

visitStaticInjectionRequest

public V visitStaticInjectionRequest(StaticInjectionRequest command)
Description copied from interface: ElementVisitor
Visit a request to inject the static fields and methods of type.

Specified by:
visitStaticInjectionRequest in interface ElementVisitor<V>


Copyright 2008 Google Inc. All Rights Reserved.