From 076e4393f25bf1ad1ff1bd2853153e2b595dd90b Mon Sep 17 00:00:00 2001 From: Roman Shevchenko Date: Thu, 28 Aug 2014 21:34:14 +0400 Subject: java-decompiler: post-import cleanup (formatting and copyright) --- .../decompiler/main/extern/IBytecodeProvider.java | 22 +++--- .../decompiler/main/extern/IDecompilatSaver.java | 44 +++++------ .../decompiler/main/extern/IFernflowerLogger.java | 89 ++++++++++----------- .../main/extern/IFernflowerPreferences.java | 91 +++++++++++----------- .../decompiler/main/extern/IIdentifierRenamer.java | 39 +++++++--- 5 files changed, 151 insertions(+), 134 deletions(-) (limited to 'src/org/jetbrains/java/decompiler/main/extern') diff --git a/src/org/jetbrains/java/decompiler/main/extern/IBytecodeProvider.java b/src/org/jetbrains/java/decompiler/main/extern/IBytecodeProvider.java index 6e13e51..7ff43fc 100644 --- a/src/org/jetbrains/java/decompiler/main/extern/IBytecodeProvider.java +++ b/src/org/jetbrains/java/decompiler/main/extern/IBytecodeProvider.java @@ -1,23 +1,23 @@ /* - * Fernflower - The Analytical Java Decompiler - * http://www.reversed-java.com + * Copyright 2000-2014 JetBrains s.r.o. * - * (C) 2008 - 2010, Stiver + * 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 * - * This software is NEITHER public domain NOR free software - * as per GNU License. See license.txt for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software is distributed WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. + * 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.jetbrains.java.decompiler.main.extern; import java.io.InputStream; public interface IBytecodeProvider { - public InputStream getBytecodeStream(String externPath, String internPath); - + public InputStream getBytecodeStream(String externPath, String internPath); } diff --git a/src/org/jetbrains/java/decompiler/main/extern/IDecompilatSaver.java b/src/org/jetbrains/java/decompiler/main/extern/IDecompilatSaver.java index 855f95c..0270b5e 100644 --- a/src/org/jetbrains/java/decompiler/main/extern/IDecompilatSaver.java +++ b/src/org/jetbrains/java/decompiler/main/extern/IDecompilatSaver.java @@ -1,39 +1,39 @@ /* - * Fernflower - The Analytical Java Decompiler - * http://www.reversed-java.com + * Copyright 2000-2014 JetBrains s.r.o. * - * (C) 2008 - 2010, Stiver + * 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 * - * This software is NEITHER public domain NOR free software - * as per GNU License. See license.txt for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software is distributed WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. + * 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.jetbrains.java.decompiler.main.extern; import java.util.jar.Manifest; public interface IDecompilatSaver { - public void copyFile(String source, String destpath, String destfilename); + public void copyFile(String source, String destpath, String destfilename); + + public void saveFolder(String path); + + public void saveClassFile(String path, String qualifiedName, String entryName, String content); + + public void saveFile(String path, String filename, String content); - public void saveFolder(String path); - - public void saveClassFile(String path, String qualifiedName, String entryName, String content); + public void createArchive(String path, String archivename, Manifest manifest); - public void saveFile(String path, String filename, String content); - - public void createArchive(String path, String archivename, Manifest manifest); + public void saveClassEntry(String path, String archivename, String qualifiedName, String entryName, String content); - public void saveClassEntry(String path, String archivename, String qualifiedName, String entryName, String content); + public void saveEntry(String path, String archivename, String entryName, String content); - public void saveEntry(String path, String archivename, String entryName, String content); + public void copyEntry(String source, String destpath, String archivename, String entry); - public void copyEntry(String source, String destpath, String archivename, String entry); - - public void closeArchive(String path, String archivename); - + public void closeArchive(String path, String archivename); } diff --git a/src/org/jetbrains/java/decompiler/main/extern/IFernflowerLogger.java b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerLogger.java index eb1427c..c80039d 100644 --- a/src/org/jetbrains/java/decompiler/main/extern/IFernflowerLogger.java +++ b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerLogger.java @@ -1,56 +1,57 @@ /* - * Fernflower - The Analytical Java Decompiler - * http://www.reversed-java.com + * Copyright 2000-2014 JetBrains s.r.o. * - * (C) 2008 - 2010, Stiver + * 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 * - * This software is NEITHER public domain NOR free software - * as per GNU License. See license.txt for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software is distributed WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. + * 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.jetbrains.java.decompiler.main.extern; import java.util.HashMap; public interface IFernflowerLogger { - public static final int TRACE = 1; - public static final int INFO = 2; - public static final int WARNING = 3; - public static final int ERROR = 4; - public static final int IMMEDIATE = 5; - - public static final HashMap mapLogLevel = new HashMap() {{ - put("TRACE", 1); - put("INFO", 2); - put("WARN", 3); - put("ERROR", 4); - put("IMME", 5); - }}; - - public static final String[] names = new String[] {""/*DUMMY ENTRY*/, "TRACE", "INFO", "WARNING", "ERROR", ""/*IMMEDIATE*/}; - - public void writeMessage(String message, int severity); - - public void writeMessage(String message, Throwable t); - - public void startClass(String classname); - - public void endClass(); - - public void startWriteClass(String classname); - - public void endWriteClass(); - - public void startMethod(String method); - - public void endMethod(); - - public int getSeverity(); - - public void setSeverity(int severity); + public static final int TRACE = 1; + public static final int INFO = 2; + public static final int WARNING = 3; + public static final int ERROR = 4; + public static final int IMMEDIATE = 5; + + public static final HashMap mapLogLevel = new HashMap() {{ + put("TRACE", 1); + put("INFO", 2); + put("WARN", 3); + put("ERROR", 4); + put("IMME", 5); + }}; + + public static final String[] names = new String[]{""/*DUMMY ENTRY*/, "TRACE", "INFO", "WARNING", "ERROR", ""/*IMMEDIATE*/}; + + public void writeMessage(String message, int severity); + + public void writeMessage(String message, Throwable t); + + public void startClass(String classname); + + public void endClass(); + + public void startWriteClass(String classname); + + public void endWriteClass(); + + public void startMethod(String method); + + public void endMethod(); + + public int getSeverity(); + + public void setSeverity(int severity); } diff --git a/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java index 9f19127..2fcc5e1 100644 --- a/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java +++ b/src/org/jetbrains/java/decompiler/main/extern/IFernflowerPreferences.java @@ -1,57 +1,58 @@ /* - * Fernflower - The Analytical Java Decompiler - * http://www.reversed-java.com + * Copyright 2000-2014 JetBrains s.r.o. * - * (C) 2008 - 2010, Stiver + * 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 * - * This software is NEITHER public domain NOR free software - * as per GNU License. See license.txt for more details. + * http://www.apache.org/licenses/LICENSE-2.0 * - * This software is distributed WITHOUT ANY WARRANTY; without - * even the implied warranty of MERCHANTABILITY or FITNESS FOR - * A PARTICULAR PURPOSE. + * 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.jetbrains.java.decompiler.main.extern; public interface IFernflowerPreferences { - public static final String REMOVE_BRIDGE = "rbr"; - public static final String REMOVE_SYNTHETIC = "rsy"; - public static final String DECOMPILE_INNER = "din"; - public static final String DECOMPILE_CLASS_1_4 = "dc4"; - public static final String DECOMPILE_ASSERTIONS = "das"; - public static final String HIDE_EMPTY_SUPER = "hes"; - public static final String HIDE_DEFAULT_CONSTRUCTOR = "hdc"; - public static final String DECOMPILE_GENERIC_SIGNATURES = "dgs"; - public static final String OUTPUT_COPYRIGHT_COMMENT = "occ"; - public static final String NO_EXCEPTIONS_RETURN = "ner"; - public static final String DECOMPILE_ENUM = "den"; - public static final String REMOVE_GETCLASS_NEW = "rgn"; - public static final String LITERALS_AS_IS = "lit"; - public static final String BOOLEAN_TRUE_ONE = "bto"; - public static final String SYNTHETIC_NOT_SET = "nns"; - public static final String UNDEFINED_PARAM_TYPE_OBJECT = "uto"; - public static final String USE_DEBUG_VARNAMES = "udv"; - public static final String MAX_PROCESSING_METHOD = "mpm"; - public static final String REMOVE_EMPTY_RANGES = "rer"; - public static final String ASCII_STRING_CHARACTERS = "asc"; - - public static final String FINALLY_DEINLINE = "fdi"; - - public static final String FINALLY_CATCHALL = "FINALLY_CATCHALL"; - public static final String FINALLY_SEMAPHOR = "FINALLY_SEMAPHOR"; - - public static final String RENAME_ENTITIES = "ren"; - public static final String USER_RENAMER_CLASS = "urc"; - - public static final String LOG_LEVEL = "log"; - - public static final String NEW_LINE_SEPARATOR = "nls"; - public static final String IDEA_NOT_NULL_ANNOTATION = "inn"; - public static final String LAMBDA_TO_ANONYMOUS_CLASS = "lac"; + public static final String REMOVE_BRIDGE = "rbr"; + public static final String REMOVE_SYNTHETIC = "rsy"; + public static final String DECOMPILE_INNER = "din"; + public static final String DECOMPILE_CLASS_1_4 = "dc4"; + public static final String DECOMPILE_ASSERTIONS = "das"; + public static final String HIDE_EMPTY_SUPER = "hes"; + public static final String HIDE_DEFAULT_CONSTRUCTOR = "hdc"; + public static final String DECOMPILE_GENERIC_SIGNATURES = "dgs"; + public static final String OUTPUT_COPYRIGHT_COMMENT = "occ"; + public static final String NO_EXCEPTIONS_RETURN = "ner"; + public static final String DECOMPILE_ENUM = "den"; + public static final String REMOVE_GETCLASS_NEW = "rgn"; + public static final String LITERALS_AS_IS = "lit"; + public static final String BOOLEAN_TRUE_ONE = "bto"; + public static final String SYNTHETIC_NOT_SET = "nns"; + public static final String UNDEFINED_PARAM_TYPE_OBJECT = "uto"; + public static final String USE_DEBUG_VARNAMES = "udv"; + public static final String MAX_PROCESSING_METHOD = "mpm"; + public static final String REMOVE_EMPTY_RANGES = "rer"; + public static final String ASCII_STRING_CHARACTERS = "asc"; + + public static final String FINALLY_DEINLINE = "fdi"; + + public static final String FINALLY_CATCHALL = "FINALLY_CATCHALL"; + public static final String FINALLY_SEMAPHOR = "FINALLY_SEMAPHOR"; + + public static final String RENAME_ENTITIES = "ren"; + public static final String USER_RENAMER_CLASS = "urc"; + + public static final String LOG_LEVEL = "log"; + + public static final String NEW_LINE_SEPARATOR = "nls"; + public static final String IDEA_NOT_NULL_ANNOTATION = "inn"; + public static final String LAMBDA_TO_ANONYMOUS_CLASS = "lac"; public static final String INDENT_STRING = "ind"; - public static final String LINE_SEPARATOR_WIN = "\r\n"; - public static final String LINE_SEPARATOR_LIN = "\n"; + public static final String LINE_SEPARATOR_WIN = "\r\n"; + public static final String LINE_SEPARATOR_LIN = "\n"; } diff --git a/src/org/jetbrains/java/decompiler/main/extern/IIdentifierRenamer.java b/src/org/jetbrains/java/decompiler/main/extern/IIdentifierRenamer.java index f379da6..88b1ca4 100644 --- a/src/org/jetbrains/java/decompiler/main/extern/IIdentifierRenamer.java +++ b/src/org/jetbrains/java/decompiler/main/extern/IIdentifierRenamer.java @@ -1,20 +1,35 @@ +/* + * Copyright 2000-2014 JetBrains s.r.o. + * + * 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. + */ package org.jetbrains.java.decompiler.main.extern; public interface IIdentifierRenamer { - public static final int ELEMENT_CLASS = 1; - - public static final int ELEMENT_FIELD = 2; + public static final int ELEMENT_CLASS = 1; - public static final int ELEMENT_METHOD = 3; - - - public boolean toBeRenamed(int element_type, String classname, String element, String descriptor); - - public String getNextClassname(String fullname, String shortname); - - public String getNextFieldname(String classname, String field, String descriptor); + public static final int ELEMENT_FIELD = 2; - public String getNextMethodname(String classname, String method, String descriptor); + public static final int ELEMENT_METHOD = 3; + + + public boolean toBeRenamed(int element_type, String classname, String element, String descriptor); + + public String getNextClassname(String fullname, String shortname); + + public String getNextFieldname(String classname, String field, String descriptor); + + public String getNextMethodname(String classname, String method, String descriptor); } -- cgit v1.2.3