Weitere ähnliche Inhalte
Ähnlich wie CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English) (20)
Kürzlich hochgeladen (20)
CDI 2.0 (JSR 365) - Java Day Tokyo 2017 (English)
- 23. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
SeContainer interface
• Handle for CDI Interface
– The handle is used to access the BeanManager
• AutoCloseable
• Extends javax.enterprise.inject.Instance
– Able to use SeContainer to look up Instance programatically
– If no qualifier is passed to SeContainer#select(), the @Default qualifier is
assumed.
– If no required type is given, the required type is the same as the parent’s one.
• Able to use CDI#current()
23
javax.enterprise.inject.se.SeContainer
- 78. Copyright © 2017, Oracle and/or its affiliates. All rights reserved. |
Deprecated methods
When? Method Alternatives
CDI 2.0 BeanManager#fireEvent() BeanManager#getEvent()
CDI 1.1 BeanManager#createInjectionTarget() BeanManager#getInjectionTargetFactory()
CDI 1.1 javax.enterprise.inject
.spi.Bean#isNullable()
No alternatives
CDI 1.1 AnnotatedMember#isStatic() Check with
AnnotatedMember#getJavaMember().getModi
fiers()
CDI 1.1 BeforeBeanDiscovery#addAnnotatedType(
AnnotatedType<?> type)
eforeBeanDiscovery#addAnnotatedType(
AnnotatedType<?> type, String id)
78