Skip to content

Commit

Permalink
MultiPackageOutputManager and its implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
matyasberry committed Sep 2, 2022
1 parent f020210 commit 28f1d52
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 2 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/*
* Copyright 2013-2022 Real Logic Limited.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* https://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.agrona.generation;

/**
* Extended version of the OutputManager allowing to set the java package.
*/
public interface MultiPackageOutputManager extends OutputManager {
/**
* Sets the current package name.
* @param packageName the packageName
*/
void setPackageName(String packageName);
}
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,7 @@
/**
* An {@link OutputManager} which can store source files as {@link StringWriter} buy source file name.
*/
public class StringWriterOutputManager implements OutputManager
{
public class StringWriterOutputManager implements MultiPackageOutputManager {
private String packageName;
private final HashMap<String, StringWriter> sourceFileByName = new HashMap<>();

Expand Down

0 comments on commit 28f1d52

Please sign in to comment.