use of org.gradle.api.tasks.options.Option in project gradle by gradle.
the class OptionReader method getFieldAnnotations.
private List<OptionElement> getFieldAnnotations(Class<?> type) {
List<OptionElement> fieldOptionElements = new ArrayList<OptionElement>();
for (Field field : type.getDeclaredFields()) {
Option option = findOption(field, Option.class);
if (option != null) {
fieldOptionElements.add(FieldOptionElement.create(option, field, optionValueNotationParserFactory));
} else {
org.gradle.api.internal.tasks.options.Option internalOption = findOption(field, org.gradle.api.internal.tasks.options.Option.class);
if (internalOption != null) {
SingleMessageLogger.nagUserOfDeprecated("org.gradle.api.internal.tasks.options.Option", "Use org.gradle.api.tasks.options.Option instead");
fieldOptionElements.add(FieldOptionElement.create(internalOption, field, optionValueNotationParserFactory));
}
}
}
return fieldOptionElements;
}
use of org.gradle.api.tasks.options.Option in project gradle by gradle.
the class OptionReader method getMethodAnnotations.
private List<OptionElementAndSignature> getMethodAnnotations(Class<?> type) {
List<OptionElementAndSignature> methodOptionElements = new ArrayList<>();
for (Method method : type.getDeclaredMethods()) {
Option option = findOption(method);
if (option != null) {
OptionElement methodOptionDescriptor = MethodOptionElement.create(option, method, optionValueNotationParserFactory);
methodOptionElements.add(new OptionElementAndSignature(methodOptionDescriptor, MethodSignature.from(method)));
}
}
return methodOptionElements;
}
use of org.gradle.api.tasks.options.Option in project MyLuaApp-Build-Core by dingyi222666.
the class OptionReader method getMethodAnnotations.
private List<OptionElement> getMethodAnnotations(Class<?> type) {
List<OptionElement> methodOptionElements = new ArrayList<OptionElement>();
for (Method method : type.getDeclaredMethods()) {
Option option = findOption(method);
if (option != null) {
OptionElement methodOptionDescriptor = MethodOptionElement.create(option, method, optionValueNotationParserFactory);
methodOptionElements.add(methodOptionDescriptor);
}
}
return methodOptionElements;
}
Aggregations