Author: akazakov
Date: 2009-11-26 10:28:37 -0500 (Thu, 26 Nov 2009)
New Revision: 18858
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IObserverMethod.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducerMethod.java
Removed:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducetMethod.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java
Log:
https://jira.jboss.org/jira/browse/JBIDE-4943
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java 2009-11-26
14:52:28 UTC (rev 18857)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBean.java 2009-11-26
15:28:37 UTC (rev 18858)
@@ -137,4 +137,13 @@
* @return "true" if this bean has @Depended scope.
*/
boolean isDependent();
+
+ /**
+ * Returns "true" if the bean is enabled. Note that implementations of some
+ * sub-interfaces of IBean like IDecorator and IInterceptor use their own
+ * mechanisms of enablement.
+ *
+ * @return "true" if the bean is enabled
+ */
+ boolean isEnabled();
}
\ No newline at end of file
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-11-26
14:52:28 UTC (rev 18857)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-11-26
15:28:37 UTC (rev 18858)
@@ -92,6 +92,16 @@
Set<IType> getStereotypes();
/**
+ * Returns the set of observers for an event which is injected by given
+ * injection point.
+ *
+ * @param injectionPoint
+ * @return the set of observers for an event which is injected by given
+ * injection point
+ */
+ Set<IObserverMethod> resolveObserverMethods(IInjectionPoint injectionPoint);
+
+ /**
* Returns the source reference to <class>...</class> element of
* <alternatives> of beans.xml. For example:
* <alternatives>
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java 2009-11-26
14:52:28 UTC (rev 18857)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java 2009-11-26
15:28:37 UTC (rev 18858)
@@ -10,7 +10,6 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
-import java.util.List;
import java.util.Set;
/**
@@ -21,25 +20,25 @@
public interface IClassBean extends IBean {
/**
- * Returns a list of producers that are declared in this bean class.
+ * Returns a set of producers that are declared in this bean class.
*
- * @return a list of producers that are declared in this bean class.
+ * @return a set of producers that are declared in this bean class.
*/
- List<IProducer> getProducers();
+ Set<IProducer> getProducers();
/**
- * Returns a list of disposer methods that are declared in this bean class.
+ * Returns a set of disposer methods that are declared in this bean class.
*
- * @return a list of disposer methods that are declared in this bean class.
+ * @return a set of disposer methods that are declared in this bean class.
*/
- List<IBeanMethod> getDisposers();
+ Set<IBeanMethod> getDisposers();
/**
- * Returns a list of bean constructor of the bean.
+ * Returns a set of bean constructor of the bean.
*
- * @return a list of bean constructor of the bean.
+ * @return a set of bean constructor of the bean.
*/
- List<IBeanMethod> getBeanConstructor();
+ Set<IBeanMethod> getBeanConstructor();
/**
* Obtains the interceptor bindings of the bean.
@@ -47,4 +46,11 @@
* @return the set of interceptor bindings
*/
Set<IInterceptorBindingDeclaration> getInterceptorBindings();
+
+ /**
+ * Returns a set of observer methods of the bean.
+ *
+ * @return a set of observer methods of the bean
+ */
+ Set<IObserverMethod> getObserverMethods();
}
\ No newline at end of file
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IObserverMethod.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IObserverMethod.java
(rev 0)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IObserverMethod.java 2009-11-26
15:28:37 UTC (rev 18858)
@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+import java.util.Set;
+
+/**
+ * Represents an observer method of a bean.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IObserverMethod extends IBeanMethod {
+
+ /**
+ * Returns the set of @Observes annotations of parameters of this method.
+ *
+ * @return the set of @Observes annotations of parameters of this method
+ */
+ Set<IAnnotationDeclaration> getObservesAnnotationDeclarations();
+}
\ No newline at end of file
Property changes on:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IObserverMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Copied:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducerMethod.java
(from rev 18762,
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducetMethod.java)
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducerMethod.java
(rev 0)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducerMethod.java 2009-11-26
15:28:37 UTC (rev 18858)
@@ -0,0 +1,20 @@
+/*******************************************************************************
+ * Copyright (c) 2009 Red Hat, Inc.
+ * Distributed under license by Red Hat, Inc. All rights reserved.
+ * This program is made available under the terms of the
+ * Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at
http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Red Hat, Inc. - initial API and implementation
+ ******************************************************************************/
+package org.jboss.tools.cdi.core;
+
+/**
+ * Represents a producer method.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IProducerMethod extends IBeanMethod, IProducer {
+
+}
\ No newline at end of file
Property changes on:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducerMethod.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Deleted:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducetMethod.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducetMethod.java 2009-11-26
14:52:28 UTC (rev 18857)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IProducetMethod.java 2009-11-26
15:28:37 UTC (rev 18858)
@@ -1,20 +0,0 @@
-/*******************************************************************************
- * Copyright (c) 2009 Red Hat, Inc.
- * Distributed under license by Red Hat, Inc. All rights reserved.
- * This program is made available under the terms of the
- * Eclipse Public License v1.0 which accompanies this distribution,
- * and is available at
http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
-package org.jboss.tools.cdi.core;
-
-/**
- * Represents a producer method.
- *
- * @author Alexey Kazakov
- */
-public interface IProducetMethod extends IBeanMethod, IProducer {
-
-}
\ No newline at end of file