@@ -0,0 +1,1835 @@
+/*%0A * Copyright 2015 Michael Rozumyanskiy%0A *%0A * Licensed under the Apache License, Version 2.0 (the %22License%22);%0A * you may not use this file except in compliance with the License.%0A * You may obtain a copy of the License at%0A *%0A *     http://www.apache.org/licenses/LICENSE-2.0%0A *%0A * Unless required by applicable law or agreed to in writing, software%0A * distributed under the License is distributed on an %22AS IS%22 BASIS,%0A * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.%0A * See the License for the specific language governing permissions and%0A * limitations under the License.%0A */%0A%0Apackage com.michaelrocks.lightsaber.processor.generation;%0A%0Aimport com.michaelrocks.lightsaber.processor.ProcessingException;%0Aimport com.michaelrocks.lightsaber.processor.ProcessorContext;%0Aimport com.michaelrocks.lightsaber.processor.io.ClassFileVisitor;%0A%0Aimport java.io.File;%0Aimport java.io.IOException;%0A%0Apublic class ProcessorClassProducer implements ClassProducer %7B%0A    private final ClassFileVisitor classFileVisitor;%0A    private final ProcessorContext processorContext;%0A%0A    public ProcessorClassProducer(final ClassFileVisitor classFileVisitor, final ProcessorContext processorContext) %7B%0A        this.classFileVisitor = classFileVisitor;%0A        this.processorContext = processorContext;%0A    %7D%0A%0A    @Override%0A    public void produceClass(final String internalName, final byte%5B%5D classData) %7B%0A        final String classFileName = internalName + %22.class%22;%0A        try %7B%0A            classFileVisitor.visitClassFile(classFileName, classData);%0A        %7D catch (final IOException exception) %7B%0A            final String message = String.format(%22Failed to produce class with %25d bytes%22, classData.length);%0A            processorContext.reportError(new ProcessingException(new File(classFileName), message, exception));%0A        %7D%0A    %7D%0A%7D%0A

Implement ClassProducer for ClassProcessor