Skip to content

Commit 7e589d7

Browse files
committed
Polish code
1 parent cca7494 commit 7e589d7

File tree

53 files changed

+835
-707
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

53 files changed

+835
-707
lines changed

projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/se/StandardContainer.java

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@
1616
*/
1717
package org.geektimes.enterprise.inject.se;
1818

19-
import org.geektimes.enterprise.inject.standard.beans.BeanArchiveManager;
20-
import org.geektimes.enterprise.inject.standard.beans.StandardBeanManager;
19+
import org.geektimes.enterprise.inject.standard.beans.manager.BeanArchiveManager;
20+
import org.geektimes.enterprise.inject.standard.beans.manager.StandardBeanManager;
2121

2222
import javax.enterprise.inject.Instance;
2323
import javax.enterprise.inject.se.SeContainer;

projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/AbstractAnnotatedTypeBean.java

-34
This file was deleted.

projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/ReflectiveAnnotated.java projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/annotation/ReflectiveAnnotated.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.geektimes.enterprise.inject.standard;
17+
package org.geektimes.enterprise.inject.standard.annotation;
1818

1919
import org.geektimes.commons.collection.util.CollectionUtils;
2020

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.geektimes.enterprise.inject.standard;
17+
package org.geektimes.enterprise.inject.standard.annotation;
1818

1919
import javax.enterprise.inject.spi.AnnotatedCallable;
2020
import javax.enterprise.inject.spi.AnnotatedParameter;
+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.geektimes.enterprise.inject.standard;
17+
package org.geektimes.enterprise.inject.standard.annotation;
1818

1919
import javax.enterprise.inject.spi.AnnotatedConstructor;
2020
import javax.enterprise.inject.spi.AnnotatedType;

projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/ReflectiveAnnotatedField.java projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/annotation/ReflectiveAnnotatedField.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.geektimes.enterprise.inject.standard;
17+
package org.geektimes.enterprise.inject.standard.annotation;
1818

1919
import javax.enterprise.inject.spi.AnnotatedField;
2020
import javax.enterprise.inject.spi.AnnotatedType;

projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/ReflectiveAnnotatedMember.java projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/annotation/ReflectiveAnnotatedMember.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.geektimes.enterprise.inject.standard;
17+
package org.geektimes.enterprise.inject.standard.annotation;
1818

1919
import javax.enterprise.inject.spi.AnnotatedMember;
2020
import javax.enterprise.inject.spi.AnnotatedType;

projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/ReflectiveAnnotatedMethod.java projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/annotation/ReflectiveAnnotatedMethod.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.geektimes.enterprise.inject.standard;
17+
package org.geektimes.enterprise.inject.standard.annotation;
1818

1919
import javax.enterprise.inject.spi.AnnotatedMethod;
2020
import javax.enterprise.inject.spi.AnnotatedType;
+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.geektimes.enterprise.inject.standard;
17+
package org.geektimes.enterprise.inject.standard.annotation;
1818

1919
import javax.enterprise.inject.spi.AnnotatedCallable;
2020
import javax.enterprise.inject.spi.AnnotatedParameter;

projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/ReflectiveAnnotatedType.java projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/annotation/ReflectiveAnnotatedType.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.geektimes.enterprise.inject.standard;
17+
package org.geektimes.enterprise.inject.standard.annotation;
1818

1919

2020
import org.geektimes.commons.reflect.util.FieldUtils;

projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/AbstractBean.java projects/stage-1/middleware-frameworks/my-cdi/src/main/java/org/geektimes/enterprise/inject/standard/beans/AbstractBean.java

+4-3
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.geektimes.enterprise.inject.standard;
17+
package org.geektimes.enterprise.inject.standard.beans;
1818

19+
import javax.enterprise.inject.spi.AnnotatedType;
1920
import javax.enterprise.inject.spi.Bean;
2021
import java.lang.reflect.AnnotatedElement;
2122
import java.lang.reflect.Field;
@@ -36,8 +37,8 @@
3637
*/
3738
public abstract class AbstractBean<A extends AnnotatedElement, T> extends AbstractBeanAttributes<A, T> implements Bean<T> {
3839

39-
public AbstractBean(A annotatedElement, Class<?> beanClass) {
40-
super(annotatedElement, beanClass);
40+
public AbstractBean(A annotatedElement, AnnotatedType<T> beanType) {
41+
super(annotatedElement, beanType);
4142
}
4243

4344
/**
+9-8
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,9 @@
1414
* See the License for the specific language governing permissions and
1515
* limitations under the License.
1616
*/
17-
package org.geektimes.enterprise.inject.standard;
17+
package org.geektimes.enterprise.inject.standard.beans;
1818

19+
import org.geektimes.enterprise.inject.standard.annotation.ReflectiveAnnotatedType;
1920
import org.geektimes.enterprise.inject.util.Qualifiers;
2021

2122
import javax.enterprise.inject.Alternative;
@@ -60,23 +61,23 @@ public abstract class AbstractBeanAttributes<A extends AnnotatedElement, T> impl
6061

6162
private boolean alternative;
6263

63-
private final AnnotatedType<T> annotatedType;
64+
private final AnnotatedType<T> beanType;
6465

6566
private boolean vetoed;
6667

67-
public AbstractBeanAttributes(A annotatedElement, Class<?> beanClass) {
68+
public AbstractBeanAttributes(A annotatedElement, AnnotatedType<T> beanType) {
6869
requireNonNull(annotatedElement, "The 'annotatedElement' argument must not be null!");
69-
requireNonNull(beanClass, "The 'beanClass' argument must not be null!");
70+
requireNonNull(beanType, "The 'beanType' argument must not be null!");
7071
validateAnnotatedElement(annotatedElement);
7172
this.annotatedElement = annotatedElement;
72-
this.beanClass = beanClass;
73+
this.beanClass = beanType.getJavaClass();
7374
this.beanTypes = getBeanTypes(beanClass);
7475
this.qualifiers = Qualifiers.getQualifiers(annotatedElement);
7576
this.scopeType = getScopeType(annotatedElement);
7677
this.beanName = getBeanName(annotatedElement);
7778
this.stereotypeTypes = getStereotypeTypes(annotatedElement);
7879
this.alternative = isAnnotationPresent(annotatedElement, Alternative.class);
79-
this.annotatedType = new ReflectiveAnnotatedType<>(beanClass);
80+
this.beanType = beanType;
8081
this.vetoed = false;
8182
}
8283

@@ -127,8 +128,8 @@ public A getAnnotatedElement() {
127128
return annotatedElement;
128129
}
129130

130-
public AnnotatedType getAnnotatedType() {
131-
return annotatedType;
131+
public AnnotatedType getBeanType() {
132+
return beanType;
132133
}
133134

134135
@Override

0 commit comments

Comments
 (0)