Example usage for com.google.common.reflect Parameter getAnnotations

List of usage examples for com.google.common.reflect Parameter getAnnotations

Introduction

In this page you can find the example usage for com.google.common.reflect Parameter getAnnotations.

Prototype

@Override
    public Annotation[] getAnnotations() 

Source Link

Usage

From source file:org.immutables.eventual.Providers.java

Dependency<ListenableFuture<?>> extractDependency(Errors methodErrors, Parameter parameter) {
    @Nullable/*from  w  w w.  ja  va2 s  .  com*/
    Annotation bindingAnnotation = Annotations.findBindingAnnotation(methodErrors,
            parameter.getDeclaringInvokable(), parameter.getAnnotations());

    return Dependency.get(futureKey(parameter.getType(), bindingAnnotation));
}

From source file:com.google.cloud.dataflow.sdk.util.ApiSurface.java

private void addExposedTypes(Parameter parameter, Class<?> cause) {
    logger.debug("Adding exposed types from {}, which is the type of parameter {}", parameter.getType(),
            parameter);//from  w ww  .  ja v  a 2 s. c o m
    addExposedTypes(parameter.getType(), cause);
    for (Annotation annotation : parameter.getAnnotations()) {
        logger.debug("Adding exposed types from {}, which is an annotation on parameter {}", annotation,
                parameter);
        addExposedTypes(annotation.annotationType(), cause);
    }
}

From source file:org.apache.beam.sdk.util.ApiSurface.java

private void addExposedTypes(Parameter parameter, Class<?> cause) {
    LOG.debug("Adding exposed types from {}, which is the type of parameter {}", parameter.getType(),
            parameter);/*from   w  w w . j a  va2 s.  com*/
    addExposedTypes(parameter.getType(), cause);
    for (Annotation annotation : parameter.getAnnotations()) {
        LOG.debug("Adding exposed types from {}, which is an annotation on parameter {}", annotation,
                parameter);
        addExposedTypes(annotation.annotationType(), cause);
    }
}