* annotation JavaAnnotation javaAnnotation(...) => JavaAnnotation$Proxy(...);
* </pre>
* @param iface
*/
private void makeInteropAnnotation(LazyInterface iface) {
Class klass = new AnnotationProxyClass(iface);
klass.setContainer(this);
klass.setScope(this);
klass.setName(iface.getName()+"$Proxy");
klass.setShared(iface.isShared());
klass.setAnnotation(true);
Annotation annotationAnnotation = new Annotation();
annotationAnnotation.setName("annotation");
klass.getAnnotations().add(annotationAnnotation);
klass.getSatisfiedTypes().add(iface.getType());
klass.setUnit(iface.getUnit());
ParameterList classpl = new ParameterList();
klass.addParameterList(classpl);
Method ctor = new AnnotationProxyMethod();
ctor.setContainer(this);
klass.setScope(this);
ctor.setAnnotation(true);
ctor.setName(iface.getName().substring(0, 1).toLowerCase() + iface.getName().substring(1));
ctor.setShared(iface.isShared());
Annotation annotationAnnotation2 = new Annotation();
annotationAnnotation2.setName("annotation");
ctor.getAnnotations().add(annotationAnnotation2);
ctor.setType(((TypeDeclaration)iface).getType());
ctor.setUnit(iface.getUnit());
ParameterList ctorpl = new ParameterList();
ctor.addParameterList(ctorpl);
AnnotationInvocation ai = new AnnotationInvocation();
ai.setConstructorDeclaration(ctor);
ai.setPrimary(klass);
ai.setInterop(true);
ctor.setAnnotationConstructor(ai);
List<AnnotationArgument> annotationArgs = new ArrayList<AnnotationArgument>();
for (Declaration member : iface.getMembers()) {
boolean isValue = member.getName().equals("value");
if (member instanceof JavaMethod) {
JavaMethod m = (JavaMethod)member;
ParameterAnnotationTerm term = new ParameterAnnotationTerm();
AnnotationArgument argument = new AnnotationArgument();
argument.setTerm(term);
{
Parameter klassParam = new Parameter();
Value value = new Value();
klassParam.setModel(value);
value.setInitializerParameter(klassParam);
klassParam.setDeclaration(klass);
value.setContainer(klass);
value.setScope(klass);
value.setName(member.getName());
klassParam.setName(member.getName());
value.setType(annotationParameterType(iface.getUnit(), m));
value.setUnboxed(true);
value.setUnit(iface.getUnit());
if(isValue)
classpl.getParameters().add(0, klassParam);
else
classpl.getParameters().add(klassParam);
argument.setParameter(klassParam);
klass.addMember(value);
}
{
Parameter ctorParam = new Parameter();
Value value = new Value();
ctorParam.setModel(value);