001/* 002 * Copyright (C) 2015-2021 KeepSafe Software 003 * 004 * Licensed under the Apache License, Version 2.0 (the "License"); 005 * you may not use this file except in compliance with the License. 006 * You may obtain a copy of the License at 007 * 008 * http://www.apache.org/licenses/LICENSE-2.0 009 * 010 * Unless required by applicable law or agreed to in writing, software 011 * distributed under the License is distributed on an "AS IS" BASIS, 012 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 013 * See the License for the specific language governing permissions and 014 * limitations under the License. 015 */ 016package com.getkeepsafe.dexcount; 017 018/** 019 * Specifies what format the task output should take. 020 */ 021public enum OutputFormat { 022 /** 023 * Specifies that method counts will be printed in a flat list of packages. 024 */ 025 LIST(".txt"), 026 027 /** 028 * Specifies that the output will be pretty-printed as an tree. 029 */ 030 TREE(".txt"), 031 032 /** 033 * Specifies that the output will be a pretty-printed JSON object. 034 */ 035 JSON(".json"), 036 037 /** 038 * Specifies that output will be a YAML document. 039 */ 040 YAML(".yml"); 041 042 private final String extension; 043 044 OutputFormat(String extension) { 045 this.extension = extension; 046 } 047 048 public String getExtension() { 049 return extension; 050 } 051}