Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
  /*
   * JBoss, Home of Professional Open Source
   * Copyright 2008, Red Hat, Inc., 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.weld.annotated.enhanced;
 
 
 
Represents a Class

Author(s):
Pete Muir
 
 public interface EnhancedAnnotatedType<T> extends EnhancedAnnotated<T, Class<T>>, AnnotatedType<T> {

    
Gets all fields on the type

Returns:
A set of abstracted fields
 
     Collection<EnhancedAnnotatedField<?, ? super T>> getEnhancedFields();

    
Gets all methods on the type including those declared on a superclass of EnhancedAnnotated.getJavaClass(). Overridden methods are not returned.

Returns:
A set of abstracted methods
 
     Collection<EnhancedAnnotatedMethod<?, ? super T>> getEnhancedMethods();

    
Gets all methods on the type

Returns:
A set of abstracted methods
 
     Collection<EnhancedAnnotatedMethod<?, ? super T>> getDeclaredEnhancedMethods();

    
Get a field by name

Parameters:
<F> the expected type of the field
fieldName the field name
Returns:
the field
 
     <F> EnhancedAnnotatedField<F, ?> getDeclaredEnhancedField(String fieldName);

    
Gets all fields which are annotated with the given annotation type on this class and all super classes

Parameters:
annotationType The annotation to match
Returns:
A set of abstracted fields with the given annotation. Returns an empty set if there are no matches
 
     Collection<EnhancedAnnotatedField<?, ?>> getEnhancedFields(Class<? extends AnnotationannotationType);

    
Gets all fields declared on this class only.

Returns:
A set of abstracted fields. Returns an empty set if there are no matches
 
     Collection<EnhancedAnnotatedField<?, ? super T>> getDeclaredEnhancedFields();

    
Gets all fields which are annotated with the given annotation type on this class only.

Parameters:
annotationType The annotation to match
Returns:
A set of abstracted fields with the given annotation. Returns an empty set if there are no matches
 
     Collection<EnhancedAnnotatedField<?, ? super T>> getDeclaredEnhancedFields(Class<? extends AnnotationannotationType);

    
Gets all constructors
 
Gets all constructors which are annotated with annotationType

Parameters:
annotationType The annotation type to match
Returns:
A set of abstracted fields with the given annotation. Returns an empty set if there are no matches
    Collection<EnhancedAnnotatedConstructor<T>> getEnhancedConstructors(Class<? extends AnnotationannotationType);

    
Gets the no-args constructor

Returns:
The no-args constructor, or null if not defined
Get the constructor which matches the argument list provided

Parameters:
parameterTypes the parameters of the constructor
Returns:
the matching constructor, or null if not defined
Gets all methods annotated with annotationType including those declared on a superclass of EnhancedAnnotated.getJavaClass(). Overridden methods are not returned.

Parameters:
annotationType The annotation to match
Returns:
A set of abstracted methods with the given annotation. Returns an empty set if there are no matches
    Collection<EnhancedAnnotatedMethod<?, ? super T>> getEnhancedMethods(Class<? extends AnnotationannotationType);

    
Gets all methods annotated with annotationType

Parameters:
annotationType The annotation to match
Returns:
A set of abstracted methods with the given annotation. Returns an empty set if there are no matches
    Collection<EnhancedAnnotatedMethod<?, ? super T>> getDeclaredEnhancedMethods(Class<? extends AnnotationannotationType);

    
Find the annotated method for a given methodDescriptor

Parameters:
methodDescriptor
Returns:
    // TODO replace with MethodSignature variant
    @Deprecated
    EnhancedAnnotatedMethod<?, ?> getEnhancedMethod(Method method);

    
Get a method by name

Parameters:
<M> the expected return type
signature the name of the method
Returns:
the method, or null if it doesn't exist
    <M> EnhancedAnnotatedMethod<M, ?> getDeclaredEnhancedMethod(MethodSignature signature);

    
Get a method by name

Parameters:
<M> the expected return type
signature the name of the method
Returns:
the method, or null if it doesn't exist
    // TODO Replace with MethodSignature variant
    @Deprecated
Gets declared with parameters annotated with annotationType

Parameters:
annotationType The annotation to match
Returns:
A set of abstracted methods with the given annotation. Returns an empty set if there are no matches
    Collection<EnhancedAnnotatedMethod<?, ? super T>> getDeclaredEnhancedMethodsWithAnnotatedParameters(Class<? extends AnnotationannotationType);

    
Gets all methods with parameters annotated with annotationType including those declared on a superclass of EnhancedAnnotated.getJavaClass(). Overridden methods are not returned.

Parameters:
annotationType The annotation to match
Returns:
A set of abstracted methods with the given annotation. Returns an empty set if there are no matches
    Collection<EnhancedAnnotatedMethod<?, ? super T>> getEnhancedMethodsWithAnnotatedParameters(Class<? extends AnnotationannotationType);

    
Gets the superclass.

Returns:
The abstracted superclass, null if there is no superclass
    boolean isParameterizedType();
    boolean isAbstract();
    boolean isEnum();
    boolean isMemberClass();
    boolean isLocalClass();
    boolean isAnonymousClass();
    boolean isSerializable();
    boolean isDiscovered();
    <S> S cast(Object object);
    <U> EnhancedAnnotatedType<? extends U> asEnhancedSubclass(EnhancedAnnotatedType<U> clazz);

    
Check if this is equivalent to a java class

Parameters:
clazz The Java class
Returns:
true if equivalent
    boolean isEquivalent(Class<?> clazz);
    String getSimpleName();


    
Gets all annotations which are declared on this annotated item with the given meta annotation type

Parameters:
The meta annotation to match
Returns:
A set of matching meta-annotations. Returns an empty set if there are no matches.
    Collection<AnnotationgetDeclaredMetaAnnotations(Class<? extends AnnotationmetaAnnotationType);

    
Returns a lightweight implementation of javax.enterprise.inject.spi.AnnotatedType with minimal memory footprint.

Returns:
the slim version of this javax.enterprise.inject.spi.AnnotatedType
    SlimAnnotatedType<T> slim();
New to GrepCode? Check out our FAQ X