Author: pete.muir(a)jboss.org
Date: 2009-10-05 14:07:40 -0400 (Mon, 05 Oct 2009)
New Revision: 3858
Removed:
ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java
Modified:
ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java
ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Observers.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/EventCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InactiveScopeTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InjectedManagerCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/JndiManagerCurrentActivityTest.java
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScopeTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/useBeforeValidationFails/UseBeforeValidationTest.java
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/select/SelectEventTest.java
Log:
Remove deprecated interface, fix RI for test
Deleted: ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java
===================================================================
--- ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java 2009-10-05 17:50:49
UTC (rev 3857)
+++ ri/trunk/api/src/main/java/javax/enterprise/event/Observer.java 2009-10-05 18:07:40
UTC (rev 3858)
@@ -1,33 +0,0 @@
-/*
-* 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.event;
-
-/**
- * The contract between the manager and an observer object.
- * This interface should not be called directly by the application.
- *
- * @author Gavin King
- *
- * @deprecated Removed in latest rev of spec.
- *
- * TODO Move into RI and remove TCK assertions
- */
-@Deprecated
-public interface Observer<T>
-{
- public boolean notify(T event);
-}
\ No newline at end of file
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-10-05
17:50:49 UTC (rev 3857)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/BeanManagerImpl.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -18,9 +18,7 @@
import java.io.Serializable;
import java.lang.annotation.Annotation;
-import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
-import java.lang.reflect.TypeVariable;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
@@ -58,9 +56,10 @@
import javax.enterprise.inject.spi.PassivationCapable;
import javax.inject.Qualifier;
+import org.jboss.interceptor.registry.InterceptorRegistry;
import org.jboss.webbeans.bean.DecoratorImpl;
-import org.jboss.webbeans.bean.SessionBean;
import org.jboss.webbeans.bean.InterceptorImpl;
+import org.jboss.webbeans.bean.SessionBean;
import org.jboss.webbeans.bean.proxy.ClientProxyProvider;
import org.jboss.webbeans.bootstrap.api.ServiceRegistry;
import org.jboss.webbeans.context.CreationalContextImpl;
@@ -78,12 +77,20 @@
import org.jboss.webbeans.manager.api.WebBeansManager;
import org.jboss.webbeans.metadata.cache.MetaAnnotationStore;
import org.jboss.webbeans.metadata.cache.ScopeModel;
-import org.jboss.webbeans.resolution.*;
+import org.jboss.webbeans.resolution.NameBasedResolver;
+import org.jboss.webbeans.resolution.Resolvable;
+import org.jboss.webbeans.resolution.ResolvableFactory;
+import org.jboss.webbeans.resolution.ResolvableWBClass;
+import org.jboss.webbeans.resolution.TypeSafeBeanResolver;
+import org.jboss.webbeans.resolution.TypeSafeDecoratorResolver;
+import org.jboss.webbeans.resolution.TypeSafeInterceptorResolver;
+import org.jboss.webbeans.resolution.TypeSafeObserverResolver;
+import org.jboss.webbeans.resolution.TypeSafeResolver;
import org.jboss.webbeans.resources.ClassTransformer;
import org.jboss.webbeans.util.Beans;
+import org.jboss.webbeans.util.Observers;
import org.jboss.webbeans.util.Proxies;
import org.jboss.webbeans.util.Reflections;
-import org.jboss.interceptor.registry.InterceptorRegistry;
import com.google.common.base.Function;
import com.google.common.base.Supplier;
@@ -581,7 +588,7 @@
public <T> Set<ObserverMethod<?, T>> resolveObserverMethods(T event,
Annotation... bindings)
{
- checkEventObjectType(event);
+ Observers.checkEventObjectType(event);
return resolveObserverMethods(event.getClass(), bindings);
}
@@ -631,32 +638,6 @@
}
- private void checkEventObjectType(Object event)
- {
- Class<?> eventType = event.getClass();
- Type[] types;
- Type resolvedType = new
Reflections.HierarchyDiscovery(eventType).getResolvedType();
- if (resolvedType instanceof Class<?>)
- {
- types = new Type[0];
- }
- else if (resolvedType instanceof ParameterizedType)
- {
- types = ((ParameterizedType) resolvedType).getActualTypeArguments();
- }
- else
- {
- throw new IllegalArgumentException("Event type " + resolvedType +
" is not allowed");
- }
- for (Type type : types)
- {
- if (type instanceof TypeVariable)
- {
- throw new IllegalArgumentException("Cannot provide an event type
parameterized with a type parameter " + resolvedType);
- }
- }
- }
-
/**
* A collection of enabled policy classes
*
@@ -875,7 +856,7 @@
public void fireEvent(Type eventType, Object event, Annotation... qualifiers)
{
- checkEventObjectType(event);
+ Observers.checkEventObjectType(event);
notifyObservers(event, resolveObserverMethods(eventType, qualifiers));
}
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java 2009-10-05
17:50:49 UTC (rev 3857)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/event/EventImpl.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -27,6 +27,7 @@
import org.jboss.webbeans.BeanManagerImpl;
import org.jboss.webbeans.bean.builtin.facade.AbstractFacade;
+import org.jboss.webbeans.util.Observers;
import org.jboss.webbeans.util.Strings;
/**
@@ -92,6 +93,7 @@
public <U extends T> Event<U> selectEvent(Type subtype, Annotation[]
bindings)
{
+ Observers.checkEventObjectType(subtype);
return new EventImpl<U>(
subtype,
this.getManager(),
Modified: ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Observers.java
===================================================================
--- ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Observers.java 2009-10-05 17:50:49
UTC (rev 3857)
+++ ri/trunk/impl/src/main/java/org/jboss/webbeans/util/Observers.java 2009-10-05 18:07:40
UTC (rev 3858)
@@ -18,30 +18,43 @@
import java.lang.reflect.ParameterizedType;
import java.lang.reflect.Type;
+import java.lang.reflect.TypeVariable;
-import javax.enterprise.event.Observer;
-
/**
* @author pmuir
*
*/
public class Observers
{
-
- public static Type getTypeOfObserver(Observer<?> observer)
+
+ public static void checkEventObjectType(Type eventType)
{
- for (Type type : observer.getClass().getGenericInterfaces())
+ Type[] types;
+ Type resolvedType = new
Reflections.HierarchyDiscovery(eventType).getResolvedType();
+ if (resolvedType instanceof Class<?>)
{
- if (type instanceof ParameterizedType)
+ types = new Type[0];
+ }
+ else if (resolvedType instanceof ParameterizedType)
+ {
+ types = ((ParameterizedType) resolvedType).getActualTypeArguments();
+ }
+ else
+ {
+ throw new IllegalArgumentException("Event type " + resolvedType +
" is not allowed");
+ }
+ for (Type type : types)
+ {
+ if (type instanceof TypeVariable<?>)
{
- ParameterizedType ptype = (ParameterizedType) type;
- if (Observer.class.isAssignableFrom((Class<?>) ptype.getRawType()))
- {
- return ptype.getActualTypeArguments()[0];
- }
+ throw new IllegalArgumentException("Cannot provide an event type
parameterized with a type parameter " + resolvedType);
}
}
- throw new RuntimeException("Cannot find observer's event type: " +
observer);
}
+ public static void checkEventObjectType(Object event)
+ {
+ checkEventObjectType(event.getClass());
+
+ }
}
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/ActivitiesTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -11,7 +11,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.UnsatisfiedResolutionException;
import javax.enterprise.inject.spi.Annotated;
@@ -269,6 +268,7 @@
return bindingTypes;
}
+ @Override
public Set<Class<? extends Annotation>> getStereotypes()
{
return Collections.emptySet();
@@ -281,20 +281,21 @@
@Test
public void testObserverBelongingToChildDoesNotFireForParentActivity()
{
- BeanManager childActivity = getCurrentManager().createActivity();
- Observer<NightTime> observer = new Observer<NightTime>()
- {
-
- public boolean notify(NightTime event)
- {
- assert false;
- return false;
- }
-
- };
- //TODO Fix this test to use an observer method in a child activity
-// childActivity.addObserver(observer);
- getCurrentManager().fireEvent(new NightTime());
+
+// BeanManager childActivity = getCurrentManager().createActivity();
+// ObserverMethod<NightTime> observer = new Observer<NightTime>()
+// {
+//
+// public boolean notify(NightTime event)
+// {
+// assert false;
+// return false;
+// }
+//
+// };
+// //TODO Fix this test to use an observer method in a child activity
+//// childActivity.addObserver(observer);
+// getCurrentManager().fireEvent(new NightTime());
}
}
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/ELCurrentActivityTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -10,7 +10,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
@@ -30,14 +29,7 @@
public class ELCurrentActivityTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
- boolean isObserved();
-
- }
-
-
private static class DummyContext implements Context
{
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/EventCurrentActivityTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/EventCurrentActivityTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/EventCurrentActivityTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -5,10 +5,8 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
-import org.jboss.webbeans.manager.api.WebBeansManager;
import org.jboss.webbeans.test.AbstractWebBeansTest;
import org.testng.annotations.Test;
@@ -21,14 +19,7 @@
public class EventCurrentActivityTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
- boolean isObserved();
-
- }
-
-
private static class DummyContext implements Context
{
@@ -64,26 +55,26 @@
@Test
public void testEventProcessedByCurrentActivity()
{
- Context dummyContext = new DummyContext();
- getCurrentManager().addContext(dummyContext);
- WebBeansManager childActivity = getCurrentManager().createActivity();
- TestableObserver<NightTime> observer = new
TestableObserver<NightTime>()
- {
+// Context dummyContext = new DummyContext();
+// getCurrentManager().addContext(dummyContext);
+// WebBeansManager childActivity = getCurrentManager().createActivity();
+// TestableObserver<NightTime> observer = new
TestableObserver<NightTime>()
+// {
+//
+// boolean observed = false;
+//
+// public boolean notify(NightTime event)
+// {
+// observed = true;
+// return false;
+// }
+//
+// public boolean isObserved()
+// {
+// return observed;
+// }
- boolean observed = false;
-
- public boolean notify(NightTime event)
- {
- observed = true;
- return false;
- }
-
- public boolean isObserved()
- {
- return observed;
- }
-
- };
+// };
//TODO Fix this test to use observer method within a child activity
// childActivity.addObserver(observer);
// childActivity.setCurrent(dummyContext.getScopeType());
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InactiveScopeTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InactiveScopeTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InactiveScopeTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -6,7 +6,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
@@ -22,14 +21,7 @@
public class InactiveScopeTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
- boolean isObserved();
-
- }
-
-
private static class DummyContext implements Context
{
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InjectedManagerCurrentActivityTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InjectedManagerCurrentActivityTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InjectedManagerCurrentActivityTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -5,7 +5,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
@@ -21,13 +20,6 @@
public class InjectedManagerCurrentActivityTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
-
- boolean isObserved();
-
- }
-
private static class DummyContext implements Context
{
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/InstanceCurrentActivityTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -10,7 +10,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import javax.enterprise.inject.AnnotationLiteral;
import javax.enterprise.inject.spi.Bean;
import javax.enterprise.inject.spi.BeanManager;
@@ -30,13 +29,6 @@
public class InstanceCurrentActivityTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
-
- boolean isObserved();
-
- }
-
public static class TameLiteral extends AnnotationLiteral<Tame> implements Tame
{}
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/JndiManagerCurrentActivityTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/JndiManagerCurrentActivityTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/JndiManagerCurrentActivityTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -5,7 +5,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.testharness.impl.packaging.IntegrationTest;
@@ -23,14 +22,6 @@
public class JndiManagerCurrentActivityTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
-
- boolean isObserved();
-
- }
-
-
private static class DummyContext implements Context
{
Modified:
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScopeTest.java
===================================================================
---
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScopeTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
ri/trunk/tests/src/test/java/org/jboss/webbeans/test/unit/activities/current/NonNormalScopeTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -5,7 +5,6 @@
import javax.enterprise.context.spi.Context;
import javax.enterprise.context.spi.Contextual;
import javax.enterprise.context.spi.CreationalContext;
-import javax.enterprise.event.Observer;
import org.jboss.testharness.impl.packaging.Artifact;
import org.jboss.webbeans.manager.api.WebBeansManager;
@@ -16,14 +15,6 @@
public class NonNormalScopeTest extends AbstractWebBeansTest
{
- static interface TestableObserver<T> extends Observer<T>
- {
-
- boolean isObserved();
-
- }
-
-
private static class DummyContext implements Context
{
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/definition/bean/custom/CustomBeanImplementationTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -32,7 +32,6 @@
@Resource(source="javax.enterprise.inject.spi.Extension",
destination="WEB-INF/classes/META-INF/services/javax.enterprise.inject.spi.Extension")
})
@IntegrationTest
-// TODO declare injection point on Cat and verify remaining assertions
public class CustomBeanImplementationTest extends AbstractJSR299Test
{
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/useBeforeValidationFails/UseBeforeValidationTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/useBeforeValidationFails/UseBeforeValidationTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/deployment/lifecycle/broken/useBeforeValidationFails/UseBeforeValidationTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -35,7 +35,7 @@
@SpecVersion(spec="cdi", version="PFD2")
public class UseBeforeValidationTest extends AbstractJSR299Test
{
- @Test(groups = {"ri-broken", "rewrite"})
+ @Test(groups = {"broken", "rewrite"})
//Still not clear how the container should now allow this, but the RI is clearly not
implementing this assertion
// TODO Needs Extension stuff adding
// TODO very hard to test
Modified:
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/select/SelectEventTest.java
===================================================================
---
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/select/SelectEventTest.java 2009-10-05
17:50:49 UTC (rev 3857)
+++
tck/trunk/impl/src/main/java/org/jboss/jsr299/tck/tests/event/select/SelectEventTest.java 2009-10-05
18:07:40 UTC (rev 3858)
@@ -51,11 +51,10 @@
assert alarm.getNumViolentBreakIns() == 1;
}
- @Test(groups = {"events", "ri-broken" }, expectedExceptions =
IllegalArgumentException.class)
+ @Test(groups = {"events" }, expectedExceptions =
IllegalArgumentException.class)
@SpecAssertion(section = "10.3.1", id = "eab")
public <T> void testEventSelectThrowsExceptionIfEventTypeHasTypeVariable()
{
- // TODO This test *doesn't* pass an event with a type variable in, it passes in
a raw class PLM
SecuritySensor sensor = getInstanceByType(SecuritySensor.class);
sensor.securityEvent.select(new TypeLiteral<SecurityEvent_Illegal<T>>()
{});
}