@@ -0,0 +1,2298 @@
+/*%0A * Copyright 2014 Real Logic Ltd.%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 */%0Apackage uk.co.real_logic.agrona.generation;%0A%0Aimport java.io.IOException;%0Aimport java.nio.file.Files;%0Aimport java.nio.file.Path;%0Aimport java.nio.file.Paths;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0Aimport static java.nio.charset.StandardCharsets.UTF_8;%0A%0Apublic final class PrimitiveExpander%0A%7B%0A    private static final String SOURCE_DIRECTORY = %22src/main/java/%22;%0A    private static final String PACKAGE = %22uk/co/real_logic/agrona/collections%22;%0A    private static final String SUFFIX = %22.java%22;%0A    private static final String GENERATED_DIRECTORY = %22build/generated-src%22;%0A%0A    private static final List%3CSubstitution%3E substitutions = Arrays.asList(%0A        new Substitution(%22long%22, %22Long%22)%0A    );%0A%0A    public static void main(String%5B%5D args) throws IOException%0A    %7B%0A        expandPrimitiveSpecialisedClass(%22IntIterator%22);%0A    %7D%0A%0A    private static void expandPrimitiveSpecialisedClass(final String className) throws IOException%0A    %7B%0A        final Path path = Paths.get(SOURCE_DIRECTORY, PACKAGE, className + SUFFIX);%0A        String contents = new String(Files.readAllBytes(path), UTF_8);%0A        for (Substitution substitution : substitutions)%0A        %7B%0A            contents = substitution.substitute(contents);%0A        %7D%0A        System.out.println(contents);%0A    %7D%0A%0A    public static final class Substitution%0A    %7B%0A        private final String primitiveType;%0A        private final String boxedType;%0A%0A        private Substitution(final String primitiveType, final String boxedType)%0A        %7B%0A            this.primitiveType = primitiveType;%0A            this.boxedType = boxedType;%0A        %7D%0A%0A        public String substitute(String contents)%0A        %7B%0A            return contents;%0A        %7D%0A    %7D%0A%7D%0A

add a source expander