Author: akazakov
Date: 2009-11-24 13:38:51 -0500 (Tue, 24 Nov 2009)
New Revision: 18811
Added:
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/IXmlElementReference.java
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/IInjectionPoint.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/IBeanManager.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-11-24
17:48:49 UTC (rev 18810)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IBeanManager.java 2009-11-24
18:38:51 UTC (rev 18811)
@@ -10,6 +10,7 @@
******************************************************************************/
package org.jboss.tools.cdi.core;
+import java.util.List;
import java.util.Set;
import org.eclipse.jdt.core.IType;
@@ -57,4 +58,79 @@
* @return the resulting set of beans
*/
Set<IBean> getBeans(IInjectionPoint injectionPoints);
+
+ /**
+ * Returns the all available qualifier types.
+ *
+ * @return the all available qualifier types.
+ */
+ Set<IType> getQualifierTypes();
+
+ /**
+ * Returns the all available stereotypes.
+ *
+ * @return the all available stereotypes.
+ */
+ Set<IType> getStereotypes();
+
+ /**
+ * Returns the source reference to <class>...</class> element of
+ * <alternatives> of beans.xml. For example:
+ * <alternatives>
+ * <class>...</class>
+ * </alternatives>
+ *
+ * @return the source reference to <class>...</class> element of
+ * <alternatives> of beans.xml.
+ */
+ List<IXmlElementReference> getAlternativeClasses();
+
+ /**
+ * Returns the source reference to <stereotype>...</stereotype> element of
+ * <alternatives> of beans.xml. For example:
+ * <alternatives>
+ * <stereotype>...</stereotype>
+ * </alternatives>
+ *
+ * @return the source reference to <stereotype>...</stereotype> element of
+ * <alternatives> of beans.xml.
+ */
+ List<IXmlElementReference> getAlternativeStereotypes();
+
+ /**
+ * Returns the source reference to <stereotype>...</stereotype> or
<class>...<class> element of
+ * <alternatives> of beans.xml by its full qualified type name. For example:
+ * <alternatives>
+ * <stereotype>org.compony.Log</stereotype>
+ * <class>org.compony.Item</class>
+ * </alternatives>
+ *
+ * @return the source reference to <stereotype>...</stereotype> or
<class>...</class> element of
+ * <alternatives> of beans.xml by its full qualified type name
+ */
+ List<IXmlElementReference> getAlternatives(String fullQualifiedTypeName);
+
+ /**
+ * Returns the source reference to <class>...</class> element of
+ * <decorators> of beans.xml. For example:
+ * <decorators>
+ * <class>...</class>
+ * </decorators>
+ *
+ * @return the source reference to <class>...</class> element of
+ * <decorators> of beans.xml.
+ */
+ List<IXmlElementReference> getDecoratorClasses();
+
+ /**
+ * Returns the source reference to <class>...</class> element of
+ * <decorators> of beans.xml by its full qualified type name. For example:
+ * <decorators>
+ * <class>org.compony.Item</class>
+ * </decorators>
+ *
+ * @return the source reference to <class>...</class> element of
+ * <decorators> of beans.xml by its full qualified type name.
+ */
+ List<IXmlElementReference> getDecoratorClasses(String fullQualifiedTypeName);
}
\ No newline at end of file
Added:
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
(rev 0)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java 2009-11-24
18:38:51 UTC (rev 18811)
@@ -0,0 +1,37 @@
+/*******************************************************************************
+ * 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;
+
+import org.eclipse.jdt.core.IType;
+
+/**
+ * Represents a decorator.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IDecorator extends IClassBean {
+
+ /**
+ * Returns the @Decorator annotation of this bean class.
+ *
+ * @return
+ */
+ IAnnotationDeclaration getDecoratorAnnotation();
+
+ /**
+ * Obtains the decorated types.
+ *
+ * @return the set of decorated types
+ */
+ Set<IType> getDecoratedTypes();
+}
\ No newline at end of file
Property changes on:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IDecorator.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Modified:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInjectionPoint.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInjectionPoint.java 2009-11-24
17:48:49 UTC (rev 18810)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IInjectionPoint.java 2009-11-24
18:38:51 UTC (rev 18811)
@@ -43,4 +43,14 @@
* injection point, and <tt>false</tt> otherwise
*/
boolean isDelegate();
+
+ /**
+ * Returns the @Decorator annotation of this injection point field or
+ * parameter of injection point method. Should not return null if
+ * isDelegate() returns "true".
+ *
+ * @return the @Decorator annotation of this injection point field or
+ * parameter of injection point method. May be null.
+ */
+ IAnnotationDeclaration getDecoratorAnnotation();
}
\ No newline at end of file
Added:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java
===================================================================
---
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java
(rev 0)
+++
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java 2009-11-24
18:38:51 UTC (rev 18811)
@@ -0,0 +1,38 @@
+/*******************************************************************************
+ * 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 org.jboss.tools.common.text.ITextSourceReference;
+
+/**
+ * Represents a reference to XML element. For example there is
+ * <class>
+ * org.mycompany.Logger
+ * </class>
+ * then getBody() will return "org.mycompany.Logger"
+ * and getStartPosition() will return the offset of the trimmed value (the index of
"o")
+ * and getLength() will return the length of "org.mycompany.Logger" string.
+ *
+ * @author Alexey Kazakov
+ */
+public interface IXmlElementReference extends ITextSourceReference {
+
+ /**
+ * Returns the trimmed string representation of the body of this XML
+ * element. For example if this object is reference to <class>
+ * org.mycompany.Logger </class> then this method will return
+ * "org.mycompany.Logger".
+ *
+ * @return the trimmed string representation of the body of this XML
+ * element.
+ */
+ String getBody();
+}
\ No newline at end of file
Property changes on:
trunk/cdi/plugins/org.jboss.tools.cdi.core/src/org/jboss/tools/cdi/core/IXmlElementReference.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain