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.jlr;
 
 import static org.jboss.weld.util.collections.WeldCollections.immutableMap;
 import static org.jboss.weld.util.collections.WeldCollections.immutableSet;
 
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
 
 
 
 
 import  edu.umd.cs.findbugs.annotations.SuppressWarnings;

Represents an annotated class

This class is immutable, and therefore threadsafe

Parameters:
<T> the type of the class
Author(s):
Pete Muir
David Allen
Ales Justin
 
 public class EnhancedAnnotatedTypeImpl<T> extends AbstractEnhancedAnnotated<T, Class<T>> implements EnhancedAnnotatedType<T> {
 
     private static final Set<Class<? extends Annotation>> MAPPED_METHOD_ANNOTATIONS;
 
     static {
         Set<Class<? extends Annotation>> annotations = new HashSet<Class<? extends Annotation>>();
         for (InterceptionType interceptionType : InterceptionTypeRegistry.getSupportedInterceptionTypes()) {
             annotations.add(InterceptionTypeRegistry.getAnnotationClass(interceptionType));
         }
         annotations.add(Inject.class);
          = ImmutableSet.copyOf(annotations);
     }
 
     @SuppressWarnings("unchecked")
     private static final Set<Class<? extends Annotation>> MAPPED_METHOD_PARAMETER_ANNOTATIONS = Arrays2.<Class<? extends Annotation>>asSet(Observes.class);
     @SuppressWarnings("unchecked")
     private static final Set<Class<? extends Annotation>> MAPPED_DECLARED_METHOD_PARAMETER_ANNOTATIONS = Arrays2.<Class<? extends Annotation>>asSet(Disposes.class);
 
     // Class attributes
     private final EnhancedAnnotatedType<? super T> superclass;
    // The set of abstracted fields
    private final Set<EnhancedAnnotatedField<?, ? super T>> fields;
    // The map from annotation type to abstracted field with annotation
    private final ArrayListMultimap<Class<? extends Annotation>, EnhancedAnnotatedField<?, ?>> annotatedFields;
    // The set of abstracted fields
    private final ArraySet<EnhancedAnnotatedField<?, ? super T>> declaredFields;
    // The map from annotation type to abstracted field with annotation
    private final ArrayListMultimap<Class<? extends Annotation>, EnhancedAnnotatedField<?, ? super T>> declaredAnnotatedFields;
    // The set of abstracted methods
    private final Set<EnhancedAnnotatedMethod<?, ? super T>> methods;
    // The map from annotation type to abstracted method with annotation
    private final Multimap<Class<? extends Annotation>, EnhancedAnnotatedMethod<?, ? super T>> annotatedMethods;
    // Methods that are overridden by other methods
    private Set<EnhancedAnnotatedMethod<?, ? super T>> overriddenMethods;
    private final Multimap<Class<? extends Annotation>, EnhancedAnnotatedMethod<?, ? super T>> annotatedMethodsByAnnotatedParameters;
    // The set of abstracted methods
    private final ArraySet<EnhancedAnnotatedMethod<?, ? super T>> declaredMethods;
    // The map from annotation type to abstracted method with annotation
    private final ArrayListMultimap<Class<? extends Annotation>, EnhancedAnnotatedMethod<?, ? super T>> declaredAnnotatedMethods;
    // The map from annotation type to method with a parameter with annotation
    private final ArrayListMultimap<Class<? extends Annotation>, EnhancedAnnotatedMethod<?, ? super T>> declaredMethodsByAnnotatedParameters;
    // The set of abstracted constructors
    // The meta-annotation map (annotation type -> set of annotations containing
    // meta-annotation) of the item
    private final Map<Class<? extends Annotation>, List<Annotation>> declaredMetaAnnotationMap;
    private final boolean discovered;
    private final SlimAnnotatedType<T> slim;
    public static <T> EnhancedAnnotatedType<T> of(SlimAnnotatedType<T> annotatedTypeClassTransformer classTransformer) {
        if (annotatedType instanceof BackedAnnotatedType<?>) {
            return new EnhancedAnnotatedTypeImpl<T>(annotatedTypebuildAnnotationMap(annotatedType.getAnnotations()), buildAnnotationMap(classTransformer.getReflectionCache().getDeclaredAnnotations(annotatedType.getJavaClass())), classTransformer);
        } else {
            return new EnhancedAnnotatedTypeImpl<T>(annotatedTypebuildAnnotationMap(annotatedType.getAnnotations()), buildAnnotationMap(annotatedType.getAnnotations()), classTransformer);
        }
    }
    protected EnhancedAnnotatedTypeImpl(SlimAnnotatedType<T> annotatedTypeMap<Class<? extends Annotation>, AnnotationannotationMapMap<Class<? extends Annotation>, AnnotationdeclaredAnnotationMapClassTransformer classTransformer) {
        super(annotatedTypeannotationMapdeclaredAnnotationMapclassTransformer);
        this. = annotatedType;
         = annotatedType instanceof BackedAnnotatedType<?>;
        if () {
            Class<? super T> superclass = annotatedType.getJavaClass().getSuperclass();
            if (superclass == null) {
                this. = null;
            } else {
                this. = classTransformer.getEnhancedAnnotatedType(superclass.getIdentifier().getBdaId());
            }
        } else {
            this. = classTransformer.getEnhancedAnnotatedType(Object.class.);
        }
        // Assign class field information
        this. = ArrayListMultimap.<Class<? extends Annotation>, EnhancedAnnotatedField<?, ? super T>>create();
        Set<EnhancedAnnotatedField<?, ? super T>> fieldsTemp = null;
        ArrayList<EnhancedAnnotatedField<?, ? super T>> declaredFieldsTemp = new ArrayList<EnhancedAnnotatedField<?, ? super T>>();
        Class<T> javaClass = annotatedType.getJavaClass();
        if () {
            this. = null;
            if (javaClass != Object.class) {
                for (AnnotatedField<? super T> field : annotatedType.getFields()) {
                    if (field.getJavaMember().getDeclaringClass().equals(javaClass)) {
                        EnhancedAnnotatedField<?, ? super T> annotatedField = EnhancedAnnotatedFieldImpl.of(fieldthisclassTransformer);
                        declaredFieldsTemp.add(annotatedField);
                        for (Annotation annotation : annotatedField.getAnnotations()) {
                            this..put(annotation.annotationType(), annotatedField);
                        }
                    }
                }
                fieldsTemp = new ArraySet<EnhancedAnnotatedField<?, ? super T>>(declaredFieldsTemp).trimToSize();
                if (( != null) && (.getJavaClass() != Object.class)) {
                    fieldsTemp = Sets.union(fieldsTemp, Reflections.<Set<EnhancedAnnotatedField<?, ? super T>>>cast(.getFields()));
                }
            }
            this. = new ArraySet<EnhancedAnnotatedField<?, ? super T>>(declaredFieldsTemp);
        } else {
            this. = ArrayListMultimap.<Class<? extends Annotation>, EnhancedAnnotatedField<?, ?>>create();
            fieldsTemp = new HashSet<EnhancedAnnotatedField<?, ? super T>>();
            for (AnnotatedField<? super T> annotatedField : annotatedType.getFields()) {
                EnhancedAnnotatedField<?, ? super T> weldField = EnhancedAnnotatedFieldImpl.of(annotatedFieldthisclassTransformer);
                fieldsTemp.add(weldField);
                if (annotatedField.getDeclaringType().getJavaClass().equals(javaClass)) {
                    declaredFieldsTemp.add(weldField);
                }
                for (Annotation annotation : weldField.getAnnotations()) {
                    this..put(annotation.annotationType(), weldField);
                    if (annotatedField.getDeclaringType().getJavaClass().equals(javaClass)) {
                        this..put(annotation.annotationType(), weldField);
                    }
                }
            }
            this. = new ArraySet<EnhancedAnnotatedField<?, ? super T>>(declaredFieldsTemp);
            fieldsTemp = new ArraySet<EnhancedAnnotatedField<?, ? super T>>(fieldsTemp).trimToSize();
            this..trimToSize();
        }
        this. = fieldsTemp;
        this..trimToSize();
        this..trimToSize();
        // Assign constructor information
        this. = new ArraySet<EnhancedAnnotatedConstructor<T>>();
        for (AnnotatedConstructor<T> constructor : annotatedType.getConstructors()) {
            EnhancedAnnotatedConstructor<T> weldConstructor = EnhancedAnnotatedConstructorImpl.of(constructorthisclassTransformer);
            this..add(weldConstructor);
            this..put(weldConstructor.getSignature(), weldConstructor);
        }
        this..trimToSize();
        // Assign method information
        this. = ArrayListMultimap.<Class<? extends Annotation>, EnhancedAnnotatedMethod<?, ? super T>>create();
        this. = ArrayListMultimap.<Class<? extends Annotation>, EnhancedAnnotatedMethod<?, ? super T>>create();
        Set<EnhancedAnnotatedMethod<?, ? super T>> methodsTemp = new HashSet<EnhancedAnnotatedMethod<?,? super T>>();
        ArrayList<EnhancedAnnotatedMethod<?, ? super T>> declaredMethodsTemp = new ArrayList<EnhancedAnnotatedMethod<?, ? super T>>();
        if () {
            if (!(javaClass.equals(Object.class))) {
                for (AnnotatedMethod<? super T> method : annotatedType.getMethods()) {
                    if (method.getJavaMember().getDeclaringClass().equals(javaClass)) {
                        EnhancedAnnotatedMethod<?, ? super T> weldMethod = EnhancedAnnotatedMethodImpl.of(methodthisclassTransformer);
                        declaredMethodsTemp.add(weldMethod);
                        for (Annotation annotation : weldMethod.getAnnotations()) {
                            this..put(annotation.annotationType(), weldMethod);
                        }
                        for (Class<? extends AnnotationannotationType : ) {
                            if (weldMethod.getEnhancedParameters(annotationType).size() > 0) {
                                this..put(annotationTypeweldMethod);
                            }
                        }
                    }
                }
                methodsTemp.addAll(declaredMethodsTemp);
                if ( != null) {
                    EnhancedAnnotatedType<?> current = ;
                    while (current.getJavaClass() != Object.class) {
                        Set<EnhancedAnnotatedMethod<?, ? super T>> superClassMethods = Reflections.cast(current.getDeclaredEnhancedMethods());
                        methodsTemp.addAll(superClassMethods);
                        current = current.getEnhancedSuperclass();
                    }
                }
            }
            this. = new ArraySet<EnhancedAnnotatedMethod<?, ? super T>>(declaredMethodsTemp);
        } else {
            for (AnnotatedMethod<? super T> method : annotatedType.getMethods()) {
                EnhancedAnnotatedMethod<?, ? super T> enhancedMethod = EnhancedAnnotatedMethodImpl.of(methodthisclassTransformer);
                methodsTemp.add(enhancedMethod);
                if (method.getJavaMember().getDeclaringClass().equals(javaClass)) {
                    declaredMethodsTemp.add(enhancedMethod);
                }
                for (Annotation annotation : enhancedMethod.getAnnotations()) {
                    if (method.getJavaMember().getDeclaringClass().equals(javaClass)) {
                        this..put(annotation.annotationType(), enhancedMethod);
                    }
                }
                for (Class<? extends AnnotationannotationType : ) {
                    if (enhancedMethod.getEnhancedParameters(annotationType).size() > 0) {
                        if (method.getJavaMember().getDeclaringClass().equals(javaClass)) {
                            this..put(annotationTypeenhancedMethod);
                        }
                    }
                }
            }
            this. = new ArraySet<EnhancedAnnotatedMethod<?, ? super T>>(declaredMethodsTemp);
        }
        this..trimToSize();
        this..trimToSize();
        ArraySetMultimap<Class<? extends Annotation>, AnnotationdeclaredMetaAnnotationMap = new ArraySetMultimap<Class<? extends Annotation>, Annotation>();
        for (Annotation declaredAnnotation : declaredAnnotationMap.values()) {
            // WELD-1310 Include synthetic annotations
            SlimAnnotatedType<?> syntheticAnnotationAnnotatedType = classTransformer
                    .getSyntheticAnnotationAnnotatedType(declaredAnnotation.annotationType());
            if (syntheticAnnotationAnnotatedType == null) {
                addMetaAnnotations(declaredMetaAnnotationMapdeclaredAnnotationclassTransformer.getReflectionCache()
                        .getAnnotations(declaredAnnotation.annotationType()), true);
            } else {
                addMetaAnnotations(declaredMetaAnnotationMapdeclaredAnnotation,
                        syntheticAnnotationAnnotatedType.getAnnotations(), true);
            }
            addMetaAnnotations(declaredMetaAnnotationMapdeclaredAnnotationclassTransformer.getTypeStore().get(declaredAnnotation.annotationType()), true);
            declaredMetaAnnotationMap.putSingleElement(declaredAnnotation.annotationType(), declaredAnnotation);
        }
        this. = immutableMap(declaredMetaAnnotationMap);
        this. = getOverriddenMethods(thismethodsTemp);
        // WELD-1548 remove all overriden methods except for those which are overriden by a bridge method
        methodsTemp.removeAll(getOverriddenMethods(thismethodsTemptrue));
        this. = methodsTemp;
    }
    protected Set<EnhancedAnnotatedMethod<?, ? super T>> getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType,
            Set<EnhancedAnnotatedMethod<?, ? super T>> methods) {
        return getOverriddenMethods(annotatedTypemethodsfalse);
    }

    

Parameters:
annotatedType
methods
skipOverridingBridgeMethods If set to true the returning set will not contain methods overriden by a bridge method
Returns:
the set of overriden methods
    protected Set<EnhancedAnnotatedMethod<?, ? super T>> getOverriddenMethods(EnhancedAnnotatedType<T> annotatedType,
            Set<EnhancedAnnotatedMethod<?, ? super T>> methodsboolean skipOverridingBridgeMethods) {
        Set<EnhancedAnnotatedMethod<?, ? super T>> overriddenMethods = new HashSet<EnhancedAnnotatedMethod<?, ? super T>>();
        Multimap<MethodSignaturePackageseenMethods = Multimaps.newSetMultimap(new HashMap<MethodSignatureCollection<Package>>(),
                HashSetSupplier.<Packageinstance());
        for (Class<? super T> clazz = annotatedType.getJavaClass(); clazz != null && clazz != Object.classclazz = clazz.getSuperclass()) {
            for (EnhancedAnnotatedMethod<?, ? super T> method : methods) {
                if (method.getJavaMember().getDeclaringClass().equals(clazz)) {
                    if (skipOverridingBridgeMethods && method.getJavaMember().isBridge()) {
                        continue;
                    }
                    if (isOverridden(methodseenMethods)) {
                        overriddenMethods.add(method);
                    }
                    seenMethods.put(method.getSignature(), method.getPackage());
                }
            }
        }
        return immutableSet(overriddenMethods);
    }
    protected Multimap<Class<? extends Annotation>, EnhancedAnnotatedMethod<?, ? super T>> buildAnnotatedMethodMultimap(Set<EnhancedAnnotatedMethod<?, ? super T>> effectiveMethods) {
        Multimap<Class<? extends Annotation>, EnhancedAnnotatedMethod<?, ? super T>> result = HashMultimap.create();
        for (EnhancedAnnotatedMethod<?, ? super T> method : effectiveMethods) {
            for (Class<? extends Annotationannotation : ) {
                if (method.isAnnotationPresent(annotation)) {
                    result.put(annotationmethod);
                }
            }
        }
        return Multimaps.unmodifiableMultimap(result);
    }
    protected Multimap<Class<? extends Annotation>, EnhancedAnnotatedMethod<?, ? super T>> buildAnnotatedParameterMethodMultimap(Set<EnhancedAnnotatedMethod<?, ? super T>> effectiveMethods) {
        Multimap<Class<? extends Annotation>, EnhancedAnnotatedMethod<?, ? super T>> result = HashMultimap.create();
        for (EnhancedAnnotatedMethod<?, ? super T> method : effectiveMethods) {
            for (Class<? extends Annotationannotation : ) {
                if (!method.getEnhancedParameters(annotation).isEmpty()) {
                    result.put(annotationmethod);
                }
            }
        }
        return Multimaps.unmodifiableMultimap(result);
    }
    private static boolean isOverridden(EnhancedAnnotatedMethod<?, ?> methodMultimap<MethodSignaturePackageseenMethods) {
        if (method.isPrivate()) {
            return false;
        } else if (method.isPackagePrivate() && seenMethods.containsKey(method.getSignature())) {
            return seenMethods.get(method.getSignature()).contains(method.getPackage());
        } else {
            return seenMethods.containsKey(method.getSignature());
        }
    }

    
Gets the implementing class

Returns:
The class
    public Class<? extends T> getAnnotatedClass() {
        return getJavaClass();
    }

    
Gets the delegate (class)

Returns:
The class
    @Override
    public Class<T> getDelegate() {
        return getJavaClass();
    }

    
Gets the abstracted fields of the class

Initializes the fields if they are null

Returns:
The set of abstracted fields
    @Override
    public Collection<EnhancedAnnotatedField<?, ? super T>> getEnhancedFields() {
        return Collections.unmodifiableCollection();
    }
    @Override
    public Collection<EnhancedAnnotatedField<?, ? super T>> getDeclaredEnhancedFields() {
        return Collections.unmodifiableCollection();
    }
    @Override
    public <F> EnhancedAnnotatedField<F, ?> getDeclaredEnhancedField(String fieldName) {
        for (EnhancedAnnotatedField<?, ?> field : ) {
            if (field.getName().equals(fieldName)) {
                return cast(field);
            }
        }
        return null;
    }
    @Override
    public Collection<EnhancedAnnotatedField<?, ? super T>> getDeclaredEnhancedFields(Class<? extends AnnotationannotationType) {
        return Collections.unmodifiableCollection(.get(annotationType));
    }
    @Override
        return cast(.get(signature));
    }

    
Gets the abstracted field annotated with a specific annotation type

If the fields map is null, initialize it first

Parameters:
annotationType The annotation type to match
Returns:
A set of matching abstracted fields, null if none are found.
    @Override
    public Collection<EnhancedAnnotatedField<?, ?>> getEnhancedFields(Class<? extends AnnotationannotationType) {
        if ( == null) {
            // Build collection from class hierarchy
            ArrayList<EnhancedAnnotatedField<?, ?>> aggregatedFields = new ArrayList<EnhancedAnnotatedField<?, ?>>(this..get(annotationType));
            if (( != null) && (.getJavaClass() != Object.class)) {
                aggregatedFields.addAll(.getEnhancedFields(annotationType));
            }
            return Collections.unmodifiableCollection(aggregatedFields);
        } else {
            // Return results collected directly from AnnotatedType
            return Collections.unmodifiableCollection(.get(annotationType));
        }
    }
    @Override
    public boolean isLocalClass() {
        return getJavaClass().isLocalClass();
    }
    @Override
    public boolean isAnonymousClass() {
        return getJavaClass().isAnonymousClass();
    }
    @Override
    public boolean isMemberClass() {
        return getJavaClass().isMemberClass();
    }
    @Override
    public boolean isAbstract() {
        return Modifier.isAbstract(getJavaClass().getModifiers());
    }
    @Override
    public boolean isEnum() {
        return getJavaClass().isEnum();
    }
    @Override
    public boolean isSerializable() {
        return Reflections.isSerializable(getJavaClass());
    }

    
Gets the abstracted methods that have a certain annotation type present

If the annotated methods map is null, initialize it first

Parameters:
annotationType The annotation type to match
Returns:
A set of matching method abstractions. Returns an empty set if no matches are found.
See also:
org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType.getEnhancedMethods(Class)
    @Override
    public Collection<EnhancedAnnotatedMethod<?, ? super T>> getEnhancedMethods(Class<? extends AnnotationannotationType) {
        return Collections.unmodifiableCollection(.get(annotationType));
    }
    @Override
    public Collection<EnhancedAnnotatedMethod<?, ? super T>> getDeclaredEnhancedMethods(Class<? extends AnnotationannotationType) {
        return Collections.unmodifiableCollection(.get(annotationType));
    }
    @Override
        return Collections.unmodifiableCollection();
    }

    
Gets constructors with given annotation type

Parameters:
annotationType The annotation type to match
Returns:
A set of abstracted constructors with given annotation type. If the constructors set is empty, initialize it first. Returns an empty set if there are no matches.
See also:
org.jboss.weld.annotated.enhanced.EnhancedAnnotatedType.getEnhancedConstructors(Class)
    @Override
    public Collection<EnhancedAnnotatedConstructor<T>> getEnhancedConstructors(Class<? extends AnnotationannotationType) {
        for (EnhancedAnnotatedConstructor<T> constructor : ) {
            if (constructor.isAnnotationPresent(annotationType)) {
                ret.add(constructor);
            }
        }
        return ret;
    }
    @Override
    }
    @Override
    public Collection<EnhancedAnnotatedMethod<?, ? super T>> getDeclaredEnhancedMethodsWithAnnotatedParameters(Class<? extends AnnotationannotationType) {
        return Collections.unmodifiableCollection(.get(annotationType));
    }
    @Override
    public EnhancedAnnotatedMethod<?, ?> getEnhancedMethod(Method methodDescriptor) {
        // TODO Should be cached
        for (EnhancedAnnotatedMethod<?, ?> annotatedMethod : getEnhancedMethods()) {
            if (annotatedMethod.getName().equals(methodDescriptor.getName()) && Arrays.equals(annotatedMethod.getParameterTypesAsArray(), methodDescriptor.getParameterTypes())) {
                return annotatedMethod;
            }
        }
        return null;
    }
    @Override
    public Collection<EnhancedAnnotatedMethod<?, ? super T>> getEnhancedMethods() {
        return ;
    }
    @Override
    public EnhancedAnnotatedMethod<?, ?> getDeclaredEnhancedMethod(Method method) {
        // TODO Should be cached
        for (EnhancedAnnotatedMethod<?, ?> annotatedMethod : ) {
            if (annotatedMethod.getName().equals(method.getName()) && Arrays.equals(annotatedMethod.getParameterTypesAsArray(), method.getParameterTypes())) {
                return annotatedMethod;
            }
        }
        return null;
    }
    @Override
    public Collection<EnhancedAnnotatedMethod<?, ? super T>> getDeclaredEnhancedMethods() {
        return Collections.unmodifiableSet();
    }
    @Override
    public <M> EnhancedAnnotatedMethod<M, ?> getDeclaredEnhancedMethod(MethodSignature signature) {
        for (EnhancedAnnotatedMethod<?, ? super T> method : ) {
            if (method.getSignature().equals(signature)) {
                return cast(method);
            }
        }
        return null;
    }
    @Override
    public <M> EnhancedAnnotatedMethod<M, ?> getEnhancedMethod(MethodSignature signature) {
        EnhancedAnnotatedMethod<M, ?> method = cast(getDeclaredEnhancedMethod(signature));
        if ((method == null) && ( != null) && (.getJavaClass() != Object.class)) {
            method = .getEnhancedMethod(signature);
        }
        return method;
    }

    
Gets a string representation of the class

Returns:
A string representation
    @Override
    public String toString() {
        return Formats.formatAnnotatedType(this);
    }
    @Override
    public String getSimpleName() {
        return getJavaClass().getSimpleName();
    }

    
Indicates if the type is static

Returns:
True if static, false otherwise
See also:
org.jboss.weld.annotated.enhanced.EnhancedAnnotated.isStatic()
    @Override
    public boolean isStatic() {
        return Reflections.isStatic(getDelegate());
    }

    
Indicates if the type if final

Returns:
True if final, false otherwise
See also:
org.jboss.weld.annotated.enhanced.EnhancedAnnotated.isFinal()
    @Override
    public boolean isFinal() {
        return Reflections.isFinal(getDelegate());
    }
    @Override
    public boolean isPublic() {
        return Modifier.isFinal(getJavaClass().getModifiers());
    }
    @Override
    public boolean isGeneric() {
        return getJavaClass().getTypeParameters().length > 0;
    }

    
Gets the name of the type

See also:
org.jboss.weld.annotated.enhanced.EnhancedAnnotated.getName()
Returns:
The name
    @Override
    public String getName() {
        return getJavaClass().getName();
    }

    
Gets the superclass abstraction of the type

Returns:
The superclass abstraction
    @Override
    public EnhancedAnnotatedType<? super T> getEnhancedSuperclass() {
        return ;
    }
    @Override
    public boolean isEquivalent(Class<?> clazz) {
        return getDelegate().equals(clazz);
    }
    @Override
    public boolean isPrivate() {
        return Modifier.isPrivate(getJavaClass().getModifiers());
    }
    @Override
    public boolean isPackagePrivate() {
        return Reflections.isPackagePrivate(getJavaClass().getModifiers());
    }
    @Override
    public Package getPackage() {
        return getJavaClass().getPackage();
    }
    @Override
    public <U> EnhancedAnnotatedType<? extends U> asEnhancedSubclass(EnhancedAnnotatedType<U> clazz) {
        return cast(this);
    }
    @Override
    public <S> S cast(Object object) {
        return Reflections.<S>cast(object);
    }
    @Override
    public Set<AnnotatedConstructor<T>> getConstructors() {
        return Collections.unmodifiableSet(Reflections.<Set<AnnotatedConstructor<T>>>cast());
    }
    @Override
    public Set<AnnotatedField<? super T>> getFields() {
        return cast();
    }
    @Override
    public Set<AnnotatedMethod<? super T>> getMethods() {
        return cast(Sets.union());
    }
    @Override
    public Set<AnnotationgetDeclaredMetaAnnotations(Class<? extends AnnotationmetaAnnotationType) {
        return Collections.unmodifiableSet(new ArraySet<Annotation>(.get(metaAnnotationType)));
    }
    @Override
    public boolean isDiscovered() {
        return ;
    }
    @Override
    public SlimAnnotatedType<T> slim() {
        return ;
    }
    @Override
    public Collection<EnhancedAnnotatedMethod<?, ? super T>> getEnhancedMethodsWithAnnotatedParameters(Class<? extends AnnotationannotationType) {
        return .get(annotationType);
    }
    @Override
    public int hashCode() {
        return .hashCode();
    }
    @Override
    public boolean equals(Object obj) {
        if (obj == null) {
            return false;
        }
        if (this == obj) {
            return true;
        }
        if (getClass() != obj.getClass()) {
            return false;
        }
        EnhancedAnnotatedTypeImpl<?> that = cast(obj);
        return .equals(that.slim);
    }
New to GrepCode? Check out our FAQ X