#!/usr/bin/env python3
#
# Copyright (C) 2021 The Android Open Source Project
#
# 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
#
#     http://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.

# Generate a big pile of interface classes.

# Create N interface files.
def createFiles(count):
  for i in range(count):
    with open("src/Interface{:03}.java".format(i), "wt") as fp:
      fp.write("interface Interface{:03} {{\n".format(i))
      if (i & 0x01) != 0:
        fp.write("    int func{:03}();\n".format(i))
      fp.write("}\n")

  with open("func-decl", "wt") as fp:
    fp.write("    implements\n")
    for i in range(count):
      fp.write("        Interface{:03},\n".format(i))
    fp.write("\n")
    for i in range(1, count, 2):
      fp.write("    public int func{:03}() {{ return {}; }}\n".format(i, i))

def main():
  createFiles(100)

if __name__ == '__main__':
  main()
