Java Code Examples for net.bytebuddy.description.annotation.AnnotationList#Empty

The following examples show how to use net.bytebuddy.description.annotation.AnnotationList#Empty . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: ParameterDescription.java    From byte-buddy with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
@SuppressFBWarnings(value = "BC_UNCONFIRMED_CAST", justification = "The implicit field type casting is not understood by Findbugs")
public AnnotationList getDeclaredAnnotations() {
    Annotation[][] annotation = parameterAnnotationSource.getParameterAnnotations();
    MethodDescription.InDefinedShape declaringMethod = getDeclaringMethod();
    if (annotation.length != declaringMethod.getParameters().size() && declaringMethod.getDeclaringType().isInnerClass()) {
        return index == 0
                ? new AnnotationList.Empty()
                : new AnnotationList.ForLoadedAnnotations(annotation[index - 1]);
    } else {
        return new AnnotationList.ForLoadedAnnotations(annotation[index]);
    }
}
 
Example 2
Source File: ParameterDescription.java    From byte-buddy with Apache License 2.0 5 votes vote down vote up
/**
 * {@inheritDoc}
 */
public AnnotationList getDeclaredAnnotations() {
    MethodDescription.InDefinedShape declaringMethod = getDeclaringMethod();
    Annotation[][] parameterAnnotation = parameterAnnotationSource.getParameterAnnotations();
    if (parameterAnnotation.length != declaringMethod.getParameters().size() && declaringMethod.getDeclaringType().isInnerClass()) {
        return index == 0
                ? new AnnotationList.Empty()
                : new AnnotationList.ForLoadedAnnotations(parameterAnnotation[index - 1]);
    } else {
        return new AnnotationList.ForLoadedAnnotations(parameterAnnotation[index]);
    }
}
 
Example 3
Source File: MethodDescription.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public AnnotationList getDeclaredAnnotations() {
    return new AnnotationList.Empty();
}
 
Example 4
Source File: PackageDescription.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public AnnotationList getDeclaredAnnotations() {
    return new AnnotationList.Empty();
}
 
Example 5
Source File: Implementation.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public AnnotationList getDeclaredAnnotations() {
    return new AnnotationList.Empty();
}
 
Example 6
Source File: Implementation.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public AnnotationList getDeclaredAnnotations() {
    return new AnnotationList.Empty();
}
 
Example 7
Source File: Implementation.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public AnnotationList getDeclaredAnnotations() {
    return new AnnotationList.Empty();
}
 
Example 8
Source File: Implementation.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public AnnotationList getDeclaredAnnotations() {
    return new AnnotationList.Empty();
}
 
Example 9
Source File: MethodRebaseResolver.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public AnnotationList getDeclaredAnnotations() {
    return new AnnotationList.Empty();
}
 
Example 10
Source File: MethodRebaseResolver.java    From byte-buddy with Apache License 2.0 4 votes vote down vote up
/**
 * {@inheritDoc}
 */
public AnnotationList getDeclaredAnnotations() {
    return new AnnotationList.Empty();
}