Deserialize annotations on property setter parameters

This commit is contained in:
Alexander Udalov
2013-10-22 21:23:53 +04:00
parent 464b0dea4b
commit dd50438c78
17 changed files with 271 additions and 168 deletions
@@ -28,7 +28,7 @@ public final class JvmAbi {
* This constant is used to identify binary format (class file) versions
* If you change class file metadata format and/or naming conventions, please increase this number
*/
public static final int VERSION = 10;
public static final int VERSION = 11;
public static final String TRAIT_IMPL_CLASS_NAME = "$TImpl";
public static final String TRAIT_IMPL_SUFFIX = "$" + TRAIT_IMPL_CLASS_NAME;
@@ -507,16 +507,15 @@ public class AnnotationDescriptorDeserializer implements AnnotationDeserializer
@NotNull ClassOrNamespaceDescriptor container,
@NotNull ProtoBuf.Callable callable,
@NotNull NameResolver nameResolver,
@NotNull AnnotatedCallableKind kind,
@NotNull ProtoBuf.Callable.ValueParameter proto
) {
// Kind = FUNCTION because properties and getters don't have any value parameters, and property setters are not supported yet
// TODO: support annotations on property setter value parameters
MemberSignature methodSignature = getCallableSignature(callable, nameResolver, AnnotatedCallableKind.FUNCTION);
MemberSignature methodSignature = getCallableSignature(callable, nameResolver, kind);
if (methodSignature != null) {
if (proto.hasExtension(JavaProtoBuf.index)) {
MemberSignature paramSignature =
MemberSignature.fromMethodSignatureAndParameterIndex(methodSignature, proto.getExtension(JavaProtoBuf.index));
return findClassAndLoadMemberAnnotations(container, callable, nameResolver, AnnotatedCallableKind.FUNCTION, paramSignature);
return findClassAndLoadMemberAnnotations(container, callable, nameResolver, kind, paramSignature);
}
}