From 035e82134d29d0856a8228942799712c98f77a51 Mon Sep 17 00:00:00 2001 From: Rodrigo Turini Date: Fri, 23 Aug 2013 19:14:02 -0300 Subject: [PATCH] deleting ScopeInfo --- .../caelum/vraptor4/ioc/cdi/ScopeInfo.java | 50 ------------------- 1 file changed, 50 deletions(-) delete mode 100644 vraptor-core/src/main/java/br/com/caelum/vraptor4/ioc/cdi/ScopeInfo.java diff --git a/vraptor-core/src/main/java/br/com/caelum/vraptor4/ioc/cdi/ScopeInfo.java b/vraptor-core/src/main/java/br/com/caelum/vraptor4/ioc/cdi/ScopeInfo.java deleted file mode 100644 index 4c71694d1..000000000 --- a/vraptor-core/src/main/java/br/com/caelum/vraptor4/ioc/cdi/ScopeInfo.java +++ /dev/null @@ -1,50 +0,0 @@ -package br.com.caelum.vraptor4.ioc.cdi; - -import java.lang.annotation.Annotation; -import java.util.HashMap; -import java.util.Map; - -import javax.enterprise.context.ApplicationScoped; -import javax.enterprise.context.RequestScoped; -import javax.enterprise.util.AnnotationLiteral; - -//TODO unit tests -@SuppressWarnings("serial") -public class ScopeInfo { - - private Class scope; - private final Map, AnnotationLiteral> scopesLiterals = new HashMap, AnnotationLiteral>(); - - { - scopesLiterals.put(ApplicationScoped.class,new AnnotationLiteral(){}); - scopesLiterals.put(RequestScoped.class,new AnnotationLiteral(){}); - } - - public ScopeInfo(Class scope) { - super(); - this.scope = scope; - } - - public ScopeInfo() { - } - - public void setScope(Class scope) { - this.scope = scope; - } - - public boolean hasScope() { - return scope != null; - } - - public Class getScope() { - return scope; - } - - public AnnotationLiteral getLiteral() { - if(this.scope==null){ - throw new IllegalStateException("Should not get literal if scope is not defined"); - } - return this.scopesLiterals.get(this.scope); - } - -}