[webbeans-commits] Webbeans SVN: r353 - ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector.
webbeans-commits at lists.jboss.org
webbeans-commits at lists.jboss.org
Mon Nov 24 02:35:15 EST 2008
Author: nickarls
Date: 2008-11-24 02:35:15 -0500 (Mon, 24 Nov 2008)
New Revision: 353
Modified:
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedField.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedItem.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedParameter.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedType.java
ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java
Log:
Javadocs/comments
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java 2008-11-21 22:38:06 UTC (rev 352)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedAnnotation.java 2008-11-24 07:35:15 UTC (rev 353)
@@ -1,3 +1,20 @@
+/*
+ * 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 org.jboss.webbeans.introspector;
import java.lang.annotation.Annotation;
@@ -10,15 +27,19 @@
*
*/
public interface AnnotatedAnnotation<T extends Annotation> extends AnnotatedType<T>
-{
-
+{
/**
- * Get all members
+ * Gets all members
+ *
+ * @return A set of abstracted members
*/
public Set<AnnotatedMethod<?>> getMembers();
/**
- * Get all the members annotated with annotationType
+ * Gets all the members annotated with annotationType
+ *
+ * @param annotationType The annotation type to match
+ * @return A set of abstracted members with the annotation type
*/
public Set<AnnotatedMethod<?>> getAnnotatedMembers(Class<? extends Annotation> annotationType);
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java 2008-11-21 22:38:06 UTC (rev 352)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedClass.java 2008-11-24 07:35:15 UTC (rev 353)
@@ -1,3 +1,20 @@
+/*
+ * 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 org.jboss.webbeans.introspector;
import java.lang.annotation.Annotation;
@@ -4,61 +21,79 @@
import java.util.List;
import java.util.Set;
-
/**
* Represents a Class
*
* @author Pete Muir
- *
+ *
*/
public interface AnnotatedClass<T> extends AnnotatedType<T>
{
-
+
/**
- * Get all fields on the type
- * @return
+ * Gets all fields on the type
+ *
+ * @return A set of abstracted fields
*/
public Set<AnnotatedField<Object>> getFields();
-
+
/**
- * Get all annotations which are annotated with the given annotation
- * type
+ * Gets all annotations which are annotated with the given annotation type
*
- * If no annotations are present which are annotated with the given
- * annotation an empty set is returned
+ * @param annotationType The annotation to match
+ * @return A set of abstracted fields with the given annotation. Returns an
+ * empty set if there are no matches
*/
public Set<AnnotatedField<Object>> getAnnotatedFields(Class<? extends Annotation> annotationType);
-
+
/**
- * Get all fields which are meta-annotated with metaAnnotationType
+ * Gets all fields which are meta-annotated with metaAnnotationType
*
- * If no annotations are present which are annotated with the given meta
- * annotation an empty set is returned
+ * @param metaAnnotationType The meta annotation to match
+ * @return A set of abstracted fields with the given meta-annotation. Returns
+ * an empty set if there are no matches
*/
- public Set<AnnotatedField<Object>> getMetaAnnotatedFields(
- Class<? extends Annotation> metaAnnotationType);
-
+ public Set<AnnotatedField<Object>> getMetaAnnotatedFields(Class<? extends Annotation> metaAnnotationType);
+
/**
- * Get all constructors which are annotated with annotationType
+ * Gets all constructors which are annotated with annotationType
+ *
+ * @param annotationType The annotation type to match
+ * @return A set of abstracted fields with the given annotation. Returns an
+ * empty set if there are no matches
*/
public Set<AnnotatedConstructor<T>> getAnnotatedConstructors(Class<? extends Annotation> annotationType);
-
+
/**
- * Get all constructors
+ * Gets all constructors
*
+ * @return A set of abstracted constructors
*/
public Set<AnnotatedConstructor<T>> getConstructors();
-
+
/**
- * Get the constructor with arguments given
+ * Gets the constructor with arguments given
+ *
+ * @param arguments The list of arguments to match
+ * @return A set of abstracted constructors with the given arguments. Returns
+ * an empty set if there are no matches
*/
public AnnotatedConstructor<T> getConstructor(List<Class<?>> arguments);
-
+
/**
- * Get all the members annotated with annotationType
+ * Gets all members annotated with annotationType
+ *
+ * @param annotationType The annotation to match
+ * @return A set of abstracted methods with the given annotation. Returns an
+ * empty set if there are no matches
*/
public Set<AnnotatedMethod<Object>> getAnnotatedMethods(Class<? extends Annotation> annotationType);
-
+
+ /**
+ * Gets the superclass
+ *
+ * @return The abstracted superclass
+ */
public AnnotatedClass<Object> getSuperclass();
-
+
}
\ No newline at end of file
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java 2008-11-21 22:38:06 UTC (rev 352)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedConstructor.java 2008-11-24 07:35:15 UTC (rev 353)
@@ -1,3 +1,20 @@
+/*
+ * 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 org.jboss.webbeans.introspector;
import java.lang.annotation.Annotation;
@@ -10,28 +27,41 @@
* Represents a Class Constructor
*
* @author Pete Muir
- *
+ *
*/
public interface AnnotatedConstructor<T> extends AnnotatedItem<T, Constructor<T>>
{
-
+
/**
- * Get all parameters to the constructor
+ * Gets all parameters to the constructor
+ *
+ * @return A set of abstracted parameters. Returns an empty set if there are
+ * no parameters
*/
public List<AnnotatedParameter<Object>> getParameters();
-
+
/**
- * Get all parameters to the constructor which are annotated with annotationType
+ * Gets all parameters to the constructor which are annotated with
+ * annotationType
+ *
+ * @param annotationType A annotation to match
+ * @return A list of abstracted parameters with the given annotation type.
+ * Returns an empty set if there are no matches.
*/
public List<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> annotationType);
-
+
/**
- * Create a new instance of the class, using this constructor
+ * Creates a new instance of the class, using this constructor
+ *
+ * @param manager The Web Beans manager
+ * @return The created instance
*/
public T newInstance(ManagerImpl manager);
-
+
/**
+ * Gets the declaring class of the annotation
*
+ * @return An abstraction of the declaring class
*/
public AnnotatedType<T> getDeclaringClass();
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedField.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedField.java 2008-11-21 22:38:06 UTC (rev 352)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedField.java 2008-11-24 07:35:15 UTC (rev 353)
@@ -1,3 +1,20 @@
+/*
+ * 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 org.jboss.webbeans.introspector;
import java.lang.reflect.Field;
@@ -14,12 +31,33 @@
public interface AnnotatedField<T> extends AnnotatedItem<T, Field>
{
+ /**
+ * Gets the annotated field
+ *
+ * @return The annotated field
+ */
public Field getAnnotatedField();
+ /**
+ * Injects an instance
+ *
+ * @param instance The instance to inject
+ * @param manager The Web Beans manager
+ */
public void inject(Object instance, ManagerImpl manager);
+ /**
+ * Gets an abstraction of the declaring class
+ *
+ * @return The declaring class
+ */
public AnnotatedType<?> getDeclaringClass();
+ /**
+ * Gets the property name of the field
+ *
+ * @return The name
+ */
public String getPropertyName();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedItem.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedItem.java 2008-11-21 22:38:06 UTC (rev 352)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedItem.java 2008-11-24 07:35:15 UTC (rev 353)
@@ -1,3 +1,20 @@
+/*
+ * 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 org.jboss.webbeans.introspector;
import java.lang.annotation.Annotation;
@@ -4,114 +21,146 @@
import java.lang.reflect.Type;
import java.util.Set;
-
/**
* AnnotatedItem provides a uniform access to the annotations on an annotated
- * item defined either in Java or XML
+ * item defined either in Java or XML
*
* @author Pete Muir
- *
+ *
*/
public interface AnnotatedItem<T, S>
{
/**
- * Get all annotations on the item
+ * Gets all annotations on the item
*
- * An empty set is returned if no annotations are present
+ * @return A set of annotations. Returns an empty set if there are no
+ * matches.
*/
public <A extends Annotation> Set<A> getAnnotations();
/**
- * Get all annotations which are annotated with the given meta annotation
+ * Gets all annotations which are annotated with the given meta annotation
* type
*
- * If no annotations are present which are annotated with the given meta
- * annotation an empty set is returned
+ * @param The meta annotation to match
+ * @return A set of matching meta-annotations. Returns an empty set if there
+ * are no matches.
*/
- public Set<Annotation> getMetaAnnotations(
- Class<? extends Annotation> metaAnnotationType);
-
- public Annotation[] getMetaAnnotationsAsArray(
- Class<? extends Annotation> metaAnnotationType);
-
+ public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType);
+
/**
- * Get the binding types for this element
+ * Gets all annotations which are annotated with the given meta annotation
+ * type
+ *
+ * @param The meta annotation to match
+ * @return An array of matching meta-annotations. Returns an empty array if
+ * there are no matches.
*/
+ public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType);
+
+ /**
+ * Gets the binding types for this element
+ *
+ * @returns A set of binding types present on the type. Returns an empty set
+ * if there are no matches.
+ */
public Set<Annotation> getBindingTypes();
-
+
+ /**
+ * Gets the binding types for this element
+ *
+ * @returns An array of binding types present on the type. Returns an empty
+ * array if there are no matches.
+ */
public Annotation[] getBindingTypesAsArray();
/**
- * Get an annotation for the annotation type specified.
+ * Gets an annotation for the annotation type specified.
*
- * If the annotation isn't present, null is returned
+ * @param annotationType The annotation to match
+ * @return An annotation if found, null if the annotation wasn't present.
*/
- public <A extends Annotation> A getAnnotation(
- Class<? extends A> annotationType);
+ public <A extends Annotation> A getAnnotation(Class<? extends A> annotationType);
/**
- * Return true if the annotation type specified is present
+ * Indicates if an annotation type specified is present
+ *
+ * @param annotationType The annotation to match
+ * @return True if present, false if not
*/
- public boolean isAnnotationPresent(
- Class<? extends Annotation> annotationType);
-
+ public boolean isAnnotationPresent(Class<? extends Annotation> annotationType);
+
/**
- * Get the underlying element
- * @return
+ * Gets the underlying element
+ *
+ * @return The annotated item
*/
public S getDelegate();
-
+
/**
- * The type of the element
- * @return
+ * Gets the type of the element
+ *
+ * @return The type of the element
*/
public Class<T> getType();
-
+
/**
- * Extends Java Class assignability such that actual type parameters are also
+ * Extends Java Class assignability such that actual type parameters are also
* considered
+ *
+ * @param that The other item to check assignability against
+ * @return True if assignable, false otherwise.
*/
public boolean isAssignableFrom(AnnotatedItem<?, ?> that);
-
+
/**
- * Returns true if any of the types provided are assignable to this, using
+ * Checks if any of the types provided are assignable to this, using
* the extended assingablity algorithm provided by AnnotatedItem.
*
* The types are assumed to contain their own actual type parameterization.
+ *
+ * @param types The set of types to match
+ * @return True if assignable, false otherwise.
*/
public boolean isAssignableFrom(Set<Class<?>> types);
-
+
/**
- * Return the actual type arguments for any parameterized types that this
+ * Gets the actual type arguments for any parameterized types that this
* AnnotatedItem represents.
+ *
+ * @return An array of type arguments
*/
public Type[] getActualTypeArguments();
-
+
/**
- * Return true if this AnnotatedItem represents a static element
+ * Indicates if this AnnotatedItem represents a static element
+ *
+ * @return True if static, false otherwise
*/
public boolean isStatic();
-
+
/**
- * Return true if this AnnotatedItem represents a final element
+ * Indicates if this AnnotatedItem represents a final element
+ * @return True if final, false otherwise
*/
public boolean isFinal();
-
+
/**
- * Return true if this AnnotatedItem can be proxyed
- * @return
+ * Indicates if this AnnotatedItem can be proxyed
+ *
+ * @return True if proxyable, false otherwise
*/
public boolean isProxyable();
-
+
/**
- * Return the name of this AnnotatedItem
+ * Gets the name of this AnnotatedItem
*
* If it is not possible to determine the name of the underling element, a
* IllegalArgumentException is thrown
+ *
+ * @return The name
*/
public String getName();
-
-
}
\ No newline at end of file
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java 2008-11-21 22:38:06 UTC (rev 352)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedMethod.java 2008-11-24 07:35:15 UTC (rev 353)
@@ -1,3 +1,20 @@
+/*
+ * 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 org.jboss.webbeans.introspector;
import java.lang.annotation.Annotation;
@@ -8,24 +25,61 @@
/**
* AnnotatedType provides a uniform access to the annotations on an annotated
- * class defined either in Java or XML
+ * class defined either in Java or XML
*
* @author Pete Muir
- *
+ *
*/
public interface AnnotatedMethod<T> extends AnnotatedItem<T, Method>
{
-
+
+ /**
+ * Gets the abstracted parameters of the method
+ *
+ * @return A list of parameters. Returns an empty list if no parameters are
+ * present.
+ */
public List<AnnotatedParameter<Object>> getParameters();
-
+
+ /**
+ * Gets the list of annotated parameters for a given meta annotation
+ *
+ * @param metaAnnotationType The meta annotation to match
+ * @return A set of matching parameter abstractions. Returns an empty list if
+ * there are no matches.
+ */
public List<AnnotatedParameter<Object>> getAnnotatedParameters(Class<? extends Annotation> metaAnnotationType);
+ /**
+ * Invokes the method
+ *
+ * @param manager The Web Beans manager
+ * @param instance The instance to invoke
+ * @return A reference to the instance
+ */
public T invoke(ManagerImpl manager, Object instance);
-
- public T invoke(Object instance, Object...parameters);
-
+
+ /**
+ * Invokes the method
+ *
+ * @param instance The instance to invoke
+ * @param parameters The method parameters
+ * @return A reference to the instance
+ */
+ public T invoke(Object instance, Object... parameters);
+
+ /**
+ * Gets the declaring class
+ *
+ * @return An abstraction of the declaring class
+ */
public AnnotatedType<?> getDeclaringClass();
-
+
+ /**
+ * Gets the property name
+ *
+ * @return The name
+ */
public String getPropertyName();
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedParameter.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedParameter.java 2008-11-21 22:38:06 UTC (rev 352)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedParameter.java 2008-11-24 07:35:15 UTC (rev 353)
@@ -1,3 +1,20 @@
+/*
+ * 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 org.jboss.webbeans.introspector;
import org.jboss.webbeans.ManagerImpl;
@@ -2,7 +19,20 @@
+/**
+ * AnnotatedParameter provides a uniform access to a method parameter defined
+ * either in Java or XML
+ *
+ * @author Pete Muir
+ * @param <T>
+ */
public interface AnnotatedParameter<T> extends AnnotatedItem<T, Object>
{
-
+
+ /**
+ * Gets the value of the parameter
+ *
+ * @param manager The Web Beans Manager
+ * @return The value
+ */
public T getValue(ManagerImpl manager);
-
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedType.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedType.java 2008-11-21 22:38:06 UTC (rev 352)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/AnnotatedType.java 2008-11-24 07:35:15 UTC (rev 353)
@@ -1,8 +1,37 @@
+/*
+ * 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 org.jboss.webbeans.introspector;
+/**
+ * AnnotatedType provides a uniform access to a type defined either in Java or
+ * XML
+ *
+ * @author Pete Muir
+ * @param <T>
+ */
public interface AnnotatedType<T> extends AnnotatedItem<T, Class<T>>
{
-
+
+ /**
+ * Gets the superclass of the type
+ *
+ * @return The abstracted superclass
+ */
public AnnotatedType<Object> getSuperclass();
-
+
}
Modified: ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java
===================================================================
--- ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java 2008-11-21 22:38:06 UTC (rev 352)
+++ ri/trunk/webbeans-ri/src/main/java/org/jboss/webbeans/introspector/ForwardingAnnotatedItem.java 2008-11-24 07:35:15 UTC (rev 353)
@@ -1,3 +1,20 @@
+/*
+ * 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 org.jboss.webbeans.introspector;
import java.lang.annotation.Annotation;
@@ -4,107 +21,183 @@
import java.lang.reflect.Type;
import java.util.Set;
+/**
+ * Provides an abstraction for delegating access to an annotated item
+ *
+ * @author Pete Muir
+ *
+ * @param <T>
+ * @param <S>
+ */
public abstract class ForwardingAnnotatedItem<T, S> implements AnnotatedItem<T, S>
{
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public Type[] getActualTypeArguments()
{
return delegate().getActualTypeArguments();
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public <A extends Annotation> A getAnnotation(Class<? extends A> annotationType)
{
return delegate().getAnnotation(annotationType);
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public <A extends Annotation> Set<A> getAnnotations()
{
return delegate().getAnnotations();
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public Set<Annotation> getMetaAnnotations(Class<? extends Annotation> metaAnnotationType)
{
return delegate().getMetaAnnotations(metaAnnotationType);
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public Annotation[] getMetaAnnotationsAsArray(Class<? extends Annotation> metaAnnotationType)
{
return delegate().getMetaAnnotationsAsArray(metaAnnotationType);
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public Set<Annotation> getBindingTypes()
{
return delegate().getBindingTypes();
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public Annotation[] getBindingTypesAsArray()
{
return delegate().getBindingTypesAsArray();
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public S getDelegate()
{
return delegate().getDelegate();
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public String getName()
{
return delegate().getName();
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public Class<T> getType()
{
return delegate().getType();
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public boolean isAnnotationPresent(Class<? extends Annotation> annotationType)
{
return delegate().isAnnotationPresent(annotationType);
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public boolean isAssignableFrom(AnnotatedItem<?, ?> that)
{
return delegate().isAssignableFrom(that);
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public boolean isAssignableFrom(Set<Class<?>> types)
{
return delegate().isAssignableFrom(types);
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public boolean isFinal()
{
return delegate().isFinal();
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public boolean isStatic()
{
return delegate().isStatic();
}
-
+
+ /**
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
public boolean isProxyable()
{
return delegate().isProxyable();
}
-
+
+ /**
+ * Overridden method into delegate
+ *
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
@Override
public boolean equals(Object obj)
{
return delegate().equals(obj);
}
-
+
+ /**
+ * Overridden method into delegate
+ *
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
@Override
public int hashCode()
{
return delegate().hashCode();
}
-
+
+ /**
+ * Overridden method into delegate
+ *
+ * @see org.jboss.webbeans.introspector.AnnotatedItem
+ */
@Override
public String toString()
{
return delegate().toString();
}
-
+
+ /**
+ * Gets the annotated item
+ *
+ * @return The annotated item
+ */
public abstract AnnotatedItem<T, S> delegate();
-
+
}
More information about the weld-commits
mailing list