[webbeans-dev] Packages proposal

Gavin King gavin at hibernate.org
Tue Jan 20 01:18:56 EST 2009


Here's a proposal for API repackaging:

javax.annotation: (existing package)
@NonBinding

javax.interceptor: (existing package)
@Interceptor
@InterceptorBindingType

javax.decorator: (decorators)
@Decorator
@Decorates

javax.stereotype: (stereotypes)
@Stereotype
@Model

javax.context: (scopes and contexts)
@ScopeType
@ApplicationScoped
@RequestScoped
@SessionScoped
@ConversationScoped
Context
Contextual
ContextNotActiveException
Conversation

javax.inject: (injection, binding types, deployment types)
@BindingType
@DeploymentType
@Named
@Initializer
@New
@Specializes
@Realizes
@Current
@Production
@Standard
@Produces
@Disposes
@Obtains
Instance
DefinitionException
DeploymentException
ExecutionException
IllegalProductException
CreationException
AmbiguousDependencyException
DuplicateBindingTypeException
InconsistentSpecializationException
NullableDependencyException
UnproxyableDependencyException
UnsatisfiedDependencyException
UnserializableDependencyException
TypeLiteral
AnnotationLiteral

javax.inject.manager: (framework integration SPI)
@Initialized
@Deployed
Bean
InjectionPoint
Decorator
Interceptor
InterceptionType
Manager

javax.event: (events)
@Observes
@Asynchronously
@IfExists
@AfterTransactionCompletion
@AfterTransactionFailure
@AfterTransactionSuccess
@BeforeTransactionCompletion
@Fires
Event
Observer
ObserverException


The types I'm most uncomfortable with are TypeLiteral and
AnnotationLiteral, which aren't really specific to injection. I wonder
if there's some other place they could go....?

Arguably @Named belongs somewhere else....

And there's a piece of me which wants to put @Realizes and
@Specializes in javax.stereotype, for some reason which I can't quite
put my finger on....

Thoughts?

-- 
Gavin King
gavin.king at gmail.com
http://in.relation.to/Bloggers/Gavin
http://hibernate.org
http://seamframework.org



More information about the weld-dev mailing list