Skip to content

Commit

Permalink
Minor. API updates, var typo in example.
Browse files Browse the repository at this point in the history
  • Loading branch information
nickarls committed Dec 11, 2009
1 parent ee2dbeb commit 39c876e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 14 deletions.
15 changes: 7 additions & 8 deletions reference/en-US/extend.xml
Expand Up @@ -182,19 +182,18 @@ MyBean(MyExtension myExtension) {
observers and contexts programmatically.
</para>

<programlisting role="JAVA"><![CDATA[public interface Manager {
<programlisting role="JAVA"><![CDATA[public interface BeanManager {
public Object getReference(Bean<?> bean, Type beanType, CreationalContext<?> ctx);
public Object getInjectableReference(InjectionPoint ij, CreationalContext<?> ctx);
public <T> CreationalContext<T> createCreationalContext(Contextual<T> contextual);
public Set<Bean<?>> getBeans(Type beanType, Annotation... bindings);
public Set<Bean<?>> getBeans(Type beanType, Annotation... qualifiers);
public Set<Bean<?>> getBeans(String name);
public <X> Bean<? extends X> getMostSpecializedBean(Bean<X> bean);
public Bean<?> getPassivationCapableBean(String id);
public <X> Bean<? extends X> resolve(Set<Bean<? extends X>> beans);
public void validate(InjectionPoint injectionPoint);
public void fireEvent(Object event, Annotation... bindings);
public <T> Set<ObserverMethod<?, T>> resolveObserverMethods(T event, Annotation... bindings);
public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... bindings);
public void fireEvent(Object event, Annotation... qualifiers);
public <T> Set<ObserverMethod<? super T>> resolveObserverMethods(T event, Annotation... qualifiers);
public List<Decorator<?>> resolveDecorators(Set<Type> types, Annotation... qualifiers);
public List<Interceptor<?>> resolveInterceptors(InterceptionType type, Annotation... interceptorBindings);
public boolean isScope(Class<? extends Annotation> annotationType);
public boolean isNormalScope(Class<? extends Annotation> annotationType);
Expand Down Expand Up @@ -255,10 +254,10 @@ AnnotatedType<SomeFrameworkComponent> type = beanManager.createAnnotatedType(Som
InjectionTarget<SomeFrameworkComponent> it = beanManager.createInjectionTarget(type);
//each instance needs its own CDI CreationalContext
CreationalContext instanceContext = beanManager.createCreationalContext(null);
CreationalContext ctx = beanManager.createCreationalContext(null);
//instantiate the framework component and inject its dependencies
SomeFrameworkComponent instance = it.produce(instanceContext); //call the constructor
SomeFrameworkComponent instance = it.produce(ctx); //call the constructor
it.inject(instance, ctx); //call initializer methods and perform field injection
it.postConstruct(instance); //call the @PostConstruct method
Expand Down
14 changes: 8 additions & 6 deletions reference/en-US/injection.xml
Expand Up @@ -744,7 +744,7 @@ public @interface HttpParam {
@Produces @HttpParam("")
String getParamValue(ServletRequest request, InjectionPoint ip) {
return request.getParameter(ip.getAnnotation(HttpParam.class).value());
return request.getParameter(ip.getAnnotated().getAnnotation(HttpParam.class).value());
}
}]]></programlisting>
Expand All @@ -756,11 +756,13 @@ public @interface HttpParam {
interface:</para>

<programlisting role="JAVA"><![CDATA[public interface InjectionPoint {
public Object getInstance();
public Bean<?> getBean();
public Member getMember():
public <T extends Annotation> T getAnnotation(Class<T> annotation);
public Set<T extends Annotation> getAnnotations();
public Type getType();
public Set<Annotation> getQualifiers();
public Bean<?> getBean();
public Member getMember();
public Annotated getAnnotated();
public boolean isDelegate();
public boolean isTransient();
}]]></programlisting>

</section>
Expand Down

0 comments on commit 39c876e

Please sign in to comment.