Search in sources :

Example 1 with Path

use of org.gradle.model.Path in project gradle by gradle.

the class DefaultMethodRuleDefinition method reference.

private ModelReference<?> reference(List<Annotation> annotations, int i) {
    Path pathAnnotation = (Path) findFirst(annotations, new Spec<Annotation>() {

        public boolean isSatisfiedBy(Annotation element) {
            return element.annotationType().equals(Path.class);
        }
    });
    ModelPath path = pathAnnotation == null ? null : ModelPath.path(pathAnnotation.value());
    ModelType<?> cast = method.getGenericParameterTypes().get(i);
    return ModelReference.of(path, cast, PARAMETER_DESC[i]);
}
Also used : Path(org.gradle.model.Path) ModelPath(org.gradle.model.internal.core.ModelPath) ModelPath(org.gradle.model.internal.core.ModelPath) Spec(org.gradle.api.specs.Spec) Annotation(java.lang.annotation.Annotation)

Aggregations

Annotation (java.lang.annotation.Annotation)1 Spec (org.gradle.api.specs.Spec)1 Path (org.gradle.model.Path)1 ModelPath (org.gradle.model.internal.core.ModelPath)1