byte[] (ClassReader reader) { myClassToBind = myRootContainer.getClassToBind(); if (myClassToBind == null){ myWarnings.add(new FormErrorInfo(null, "No class to bind specified")); return null; } if (myRootContainer.getComponentCount() != 1) { myErrors.add(new FormErrorInfo(null, "There should be only one component at the top level")); return null; } String nonEmptyPanel = Utils.findNotEmptyPanelWithXYLayout(myRootContainer.getComponent(0)); if (nonEmptyPanel != null) { myErrors.add(new FormErrorInfo(nonEmptyPanel, "There are non empty panels with XY layout. Please lay them out in a grid.")); return null; } FirstPassClassVisitor visitor = new FirstPassClassVisitor(); reader.accept(visitor, 0); reader.accept(new FormClassVisitor(myClassWriter, visitor.isExplicitSetupCall(), myUseDynamicBundles), 0); myPatchedData = myClassWriter.toByteArray(); return myPatchedData; }