Author: akazakov
Date: 2009-11-25 16:10:44 -0500 (Wed, 25 Nov 2009)
New Revision: 18839
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptor.java
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IAnnotationDeclaration.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
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinding.java
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBindingDeclaration.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/IAnnotationDeclaration.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IAnnotationDeclaration.java 2009-11-25
18:40:22 UTC (rev 18838)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IAnnotationDeclaration.java 2009-11-25
21:10:44 UTC (rev 18839)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.core;
import org.eclipse.jdt.core.IAnnotation;
+import org.eclipse.jdt.core.IMember;
/**
* Represents an annotation declaration. For example a qualifier or a scope
@@ -22,7 +23,15 @@
/**
* Return the annotation declaration.
+ *
* @return the annotation declaration.
*/
IAnnotation getDeclaration();
+
+ /**
+ * Returns the member which is annotated by this declaration.
+ *
+ * @return the member which is annotated by this declaration
+ */
+ IMember getParentMember();
}
\ 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-25
18:40:22 UTC (rev 18838)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-11-25
21:10:44 UTC (rev 18839)
@@ -13,6 +13,7 @@
import java.util.List;
import java.util.Set;
+import org.eclipse.core.runtime.IPath;
import org.eclipse.jdt.core.IType;
import org.jboss.tools.common.text.INodeReference;
@@ -61,6 +62,22 @@
Set<IBean> getBeans(IInjectionPoint injectionPoints);
/**
+ * Returns the bean which is declared in the given IType.
+ *
+ * @param type
+ * @return the bean which is declared in the given IType
+ */
+ IClassBean getBeanClass(IType type);
+
+ /**
+ * Returns the set of beans by resource path.
+
+ * @param resource path
+ * @return the set of beans by resource path.
+ */
+ Set<IBean> getBeans(IPath path);
+
+ /**
* Returns the all available qualifier types.
*
* @return the all available qualifier types.
@@ -134,4 +151,28 @@
* <decorators> of beans.xml by its full qualified type name.
*/
List<INodeReference> getDecoratorClasses(String fullQualifiedTypeName);
+
+ /**
+ * Returns the source reference to <class>...</class> element of
+ * <interceptors> of beans.xml. For example:
+ * <interceptors>
+ * <class>...</class>
+ * </interceptors>
+ *
+ * @return the source reference to <class>...</class> element of
+ * <interceptors> of beans.xml.
+ */
+ List<INodeReference> getInterceptorClasses();
+
+ /**
+ * Returns the source reference to <class>...</class> element of
+ * <interceptors> of beans.xml by its full qualified type name. For example:
+ * <interceptors>
+ * <class>org.compony.Item</class>
+ * </interceptors>
+ *
+ * @return the source reference to <class>...</class> element of
+ * <interceptors> of beans.xml by its full qualified type name.
+ */
+ List<INodeReference> getInterceptorClasses(String fullQualifiedTypeName);
}
\ No newline at end of file
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-25
18:40:22 UTC (rev 18838)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IClassBean.java 2009-11-25
21:10:44 UTC (rev 18839)
@@ -11,6 +11,7 @@
package org.jboss.tools.cdi.core;
import java.util.List;
+import java.util.Set;
/**
* Represents a class-based bean.
@@ -39,4 +40,11 @@
* @return a list of bean constructor of the bean.
*/
List<IBeanMethod> getBeanConstructor();
+
+ /**
+ * Obtains the interceptor bindings of the bean.
+ *
+ * @return the set of interceptor bindings
+ */
+ Set<IInterceptorBindingDeclaration> getInterceptorBindings();
}
\ No newline at end of file
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java 2009-11-25
18:40:22 UTC (rev 18838)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java 2009-11-25
21:10:44 UTC (rev 18839)
@@ -24,7 +24,7 @@
/**
* Returns the @Decorator annotation of this bean class.
*
- * @return
+ * @return the @Decorator annotation of this bean class
*/
IAnnotationDeclaration getDecoratorAnnotation();
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptor.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptor.java
(rev 0)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptor.java 2009-11-25
21:10:44 UTC (rev 18839)
@@ -0,0 +1,26 @@
+/*******************************************************************************
+ * 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 an interceptor.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IInterceptor extends IClassBean {
+
+ /**
+ * Returns the @Interceptor annotation of this bean class.
+ *
+ * @return the @Interceptor annotation of this bean class
+ */
+ IAnnotationDeclaration getInterceptorAnnotation();
+}
\ No newline at end of file
Property changes on:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptor.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinding.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinding.java 2009-11-25
18:40:22 UTC (rev 18838)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBinding.java 2009-11-25
21:10:44 UTC (rev 18839)
@@ -7,12 +7,31 @@
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.cdi.core;
+import java.util.Set;
+
+import org.eclipse.jdt.core.IType;
+
/**
+ * Represents an interceptor binding type.
+ *
* @author Alexey Kazakov
*/
-public interface IInterceptorBinding {
+public interface IInterceptorBinding extends ICDIElement {
+ /**
+ * Returns the corresponding IType of the interceptor binding.
+ *
+ * @return the corresponding IType
+ */
+ IType getSourceType();
+
+ /**
+ * Returns the interceptor binding declarations of the interceptor binding.
+ *
+ * @return the interceptor binding declarations.
+ */
+ Set<IInterceptorBindingDeclaration> getInterceptorBindingDeclarations();
}
\ No newline at end of file
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBindingDeclaration.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBindingDeclaration.java 2009-11-25
18:40:22 UTC (rev 18838)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInterceptorBindingDeclaration.java 2009-11-25
21:10:44 UTC (rev 18839)
@@ -7,7 +7,7 @@
*
* Contributors:
* Red Hat, Inc. - initial API and implementation
- ******************************************************************************/
+ ******************************************************************************/
package org.jboss.tools.cdi.core;
/**