use of org.eclipse.xtext.common.types.JvmAnnotationType in project xtext-xtend by eclipse.
the class XtendAnnotationReferenceImpl method translateAnnotationValue.
protected Object translateAnnotationValue(final XExpression value, final String property) {
final JvmType annotationType = this.getDelegate().getAnnotationType();
if ((annotationType instanceof JvmAnnotationType)) {
final Function1<JvmOperation, Boolean> _function = (JvmOperation it) -> {
String _simpleName = it.getSimpleName();
return Boolean.valueOf(Objects.equal(_simpleName, property));
};
final JvmOperation operation = IterableExtensions.<JvmOperation>findFirst(Iterables.<JvmOperation>filter(((JvmAnnotationType) annotationType).getMembers(), JvmOperation.class), _function);
if ((operation != null)) {
final boolean array = this.getCompilationUnit().getTypeReferences().isArray(operation.getReturnType());
return this.getCompilationUnit().translateAnnotationValue(value, operation.getReturnType(), array);
}
}
return this.getCompilationUnit().translateAnnotationValue(value, null, false);
}
Aggregations