Skip to content

Commit

Permalink
Update BeanManager to new spec, add bridge for tests that use SPI met…
Browse files Browse the repository at this point in the history
…hods which are no longer available, implement new bootstrap events, partial implementation of new methods of BeanManager in ManagerImpl.

git-svn-id: http://anonsvn.jboss.org/repos/weld/ri/trunk@2765 1c488680-804c-0410-94cd-c6b725194a0e
  • Loading branch information
Clint Popetz committed Jun 4, 2009
1 parent 14cc591 commit fb48c54
Show file tree
Hide file tree
Showing 34 changed files with 694 additions and 569 deletions.
7 changes: 7 additions & 0 deletions api/pom.xml
Expand Up @@ -13,4 +13,11 @@
<packaging>jar</packaging>
<name>JSR-299 API</name>
<url>http://www.seamframework.org/WebBeans</url>

<dependencies>
<dependency>
<groupId>javax.el</groupId>
<artifactId>el-api</artifactId>
</dependency>
</dependencies>
</project>
@@ -1,41 +1,5 @@
/*
* JBoss, Home of Professional Open Source
* Copyright 2008, Red Hat Middleware LLC, and individual contributors
* by the @authors tag. See the copyright.txt in the distribution for a
* full listing of individual contributors.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
* http://www.apache.org/licenses/LICENSE-2.0
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/

package javax.enterprise.inject.spi;

import static java.lang.annotation.ElementType.FIELD;
import static java.lang.annotation.ElementType.PARAMETER;
import static java.lang.annotation.RetentionPolicy.RUNTIME;

import java.lang.annotation.Retention;
import java.lang.annotation.Target;

import javax.enterprise.inject.BindingType;

/**
* Event binding type for the event that is raised by the manager when
* it has completed resolving and validation
*
* @author Pete Muir
*/

@BindingType
@Retention(RUNTIME)
@Target( { FIELD, PARAMETER })
public @interface AfterBeanDiscovery
{
public interface AfterBeanDiscovery {
public void addDefinitionError(Throwable t);
}
12 changes: 12 additions & 0 deletions api/src/main/java/javax/enterprise/inject/spi/Annotated.java
@@ -0,0 +1,12 @@
package javax.enterprise.inject.spi;

import java.lang.annotation.Annotation;
import java.lang.reflect.Type;
import java.util.Set;

public interface Annotated {
Type getType();
public <T extends Annotation> T getAnnotation(Class<T> annotationType);
public Set<Annotation> getAnnotations();
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType);
}
@@ -0,0 +1,7 @@
package javax.enterprise.inject.spi;

import java.util.List;

public interface AnnotatedCallable<X> extends AnnotatedMember<X> {
public List<AnnotatedParameter<X>> getParameters();
}
@@ -0,0 +1,7 @@
package javax.enterprise.inject.spi;

import java.lang.reflect.Constructor;

public interface AnnotatedConstructor<X> extends AnnotatedCallable<X> {
public Constructor<X> getJavaMember();
}
@@ -0,0 +1,7 @@
package javax.enterprise.inject.spi;

import java.lang.reflect.Field;

public interface AnnotatedField<X> extends AnnotatedMember<X> {
public Field getJavaMember();
}
@@ -0,0 +1,9 @@
package javax.enterprise.inject.spi;

import java.lang.reflect.Member;

public interface AnnotatedMember<X> extends Annotated {
public Member getJavaMember();
public boolean isStatic();
public AnnotatedType<X> getDeclaringType();
}
@@ -0,0 +1,7 @@
package javax.enterprise.inject.spi;

import java.lang.reflect.Method;

public interface AnnotatedMethod<X> extends AnnotatedCallable<X> {
public Method getJavaMember();
}
@@ -0,0 +1,6 @@
package javax.enterprise.inject.spi;

public interface AnnotatedParameter<X> extends Annotated {
public int getPosition();
public AnnotatedCallable<X> getDeclaringCallable();
}
10 changes: 10 additions & 0 deletions api/src/main/java/javax/enterprise/inject/spi/AnnotatedType.java
@@ -0,0 +1,10 @@
package javax.enterprise.inject.spi;

import java.util.Set;

public interface AnnotatedType<X> extends Annotated {
public Class<X> getJavaClass();
public Set<AnnotatedConstructor<X>> getConstructors();
public Set<AnnotatedMethod<? super X>> getMethods();
public Set<AnnotatedField<? super X>> getFields();
}

0 comments on commit fb48c54

Please sign in to comment.