Reformating to fix checkstyle.

This commit is contained in:
Jindra Petřík
2024-08-07 18:33:17 +02:00
parent a5d3ce4f9b
commit f3da12e032
2432 changed files with 39110 additions and 44808 deletions

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash;
/**
* A handler for abort, retry, ignore, ignore all dialog
*
* @author JPEXS
*/
public interface AbortRetryIgnoreHandler {
@@ -49,6 +50,7 @@ public interface AbortRetryIgnoreHandler {
/**
* Handles the thrown exception
*
* @param thrown The thrown exception
* @return The result
*/
@@ -56,6 +58,7 @@ public interface AbortRetryIgnoreHandler {
/**
* Returns a new instance of this handler
*
* @return A new instance of this handler
*/
public AbortRetryIgnoreHandler getNewInstance();

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,6 +20,7 @@ import java.util.ResourceBundle;
/**
* Application resources
*
* @author JPEXS
*/
public class AppResources {
@@ -31,6 +32,7 @@ public class AppResources {
/**
* Translates a key
*
* @param key The key
* @return The translated key
*/
@@ -40,6 +42,7 @@ public class AppResources {
/**
* Translates a key from a bundle
*
* @param bundle The bundle
* @param key The key
* @return The translated key

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -21,6 +21,7 @@ import java.util.Properties;
/**
* Application information
*
* @author JPEXS
*/
public class ApplicationInfo {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -24,6 +24,7 @@ import java.util.Set;
/**
* Base local data
*
* @author JPEXS
*/
public abstract class BaseLocalData {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -27,6 +27,7 @@ import java.util.Set;
/**
* Binary search SWF bundle
*
* @author JPEXS
*/
public class BinarySWFBundle implements Bundle {
@@ -38,6 +39,7 @@ public class BinarySWFBundle implements Bundle {
/**
* Constructs a new BinarySWFBundle.
*
* @param is Input stream
* @param noCheck Do not check
* @param searchMode Search mode
@@ -50,6 +52,7 @@ public class BinarySWFBundle implements Bundle {
/**
* Gets size of the search.
*
* @return Size of the search
*/
@Override
@@ -59,6 +62,7 @@ public class BinarySWFBundle implements Bundle {
/**
* Gets keys.
*
* @return Keys
*/
@Override
@@ -72,6 +76,7 @@ public class BinarySWFBundle implements Bundle {
/**
* Gets openable.
*
* @param key Key
* @return Openable
*/
@@ -94,6 +99,7 @@ public class BinarySWFBundle implements Bundle {
/**
* Gets all.
*
* @return Map of string to seekable input stream
*/
@Override
@@ -107,6 +113,7 @@ public class BinarySWFBundle implements Bundle {
/**
* Gets extension.
*
* @return Extension
*/
@Override
@@ -116,6 +123,7 @@ public class BinarySWFBundle implements Bundle {
/**
* Checks if read only.
*
* @return True if read only, false otherwise
*/
@Override
@@ -125,6 +133,7 @@ public class BinarySWFBundle implements Bundle {
/**
* Replaces openable.
*
* @param key Key
* @param is Input stream
* @return True if successful, false otherwise

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -23,26 +23,30 @@ import java.util.Map;
import java.util.Set;
/**
* Bundle interface.
* A bundle is a collection of openable files. (e.g. SWC, ZIP, etc.)
* Bundle interface. A bundle is a collection of openable files. (e.g. SWC, ZIP,
* etc.)
*
* @author JPEXS
*/
public interface Bundle {
/**
* Gets number of openable files in the bundle.
*
* @return Number of openable files in the bundle
*/
public int length();
/**
* Gets keys of openable files in the bundle.
*
* @return Keys of openable files in the bundle
*/
public Set<String> getKeys();
/**
* Gets openable file by key.
*
* @param key Key
* @return Openable file
* @throws IOException
@@ -51,6 +55,7 @@ public interface Bundle {
/**
* Gets all openable files in the bundle.
*
* @return Map from key to seekable input stream
* @throws IOException
*/
@@ -58,18 +63,21 @@ public interface Bundle {
/**
* Gets extension of the bundle. (without dot)
*
* @return Extension of the bundle
*/
public String getExtension();
/**
* Checks if the bundle is read-only.
*
* @return True if the bundle is read-only, false otherwise
*/
public boolean isReadOnly();
/**
* Replace openable file by key.
*
* @param key Key
* @param is New input stream
* @return True if the file was replaced, false otherwise

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -45,6 +45,7 @@ import java.util.logging.Logger;
/**
* Decompiler thread pool.
*
* @author JPEXS
*/
public class DecompilerPool {
@@ -71,6 +72,7 @@ public class DecompilerPool {
/**
* Submits a task.
*
* @param src Source
* @param actions Actions
* @param listener Listener
@@ -110,6 +112,7 @@ public class DecompilerPool {
/**
* Submits a task.
*
* @param abcIndex ABC index
* @param pack Script pack
* @param listener Listener
@@ -153,6 +156,7 @@ public class DecompilerPool {
/**
* Submits a task.
*
* @param callable Callable
* @return Future
*/
@@ -179,6 +183,7 @@ public class DecompilerPool {
/**
* Gets statistics.
*
* @return Statistics
*/
public String getStat() {
@@ -193,6 +198,7 @@ public class DecompilerPool {
/**
* Decompiles ASM source.
*
* @param src ASM source
* @param actions Actions
* @return Highlighted text
@@ -224,6 +230,7 @@ public class DecompilerPool {
/**
* Decompiles a script pack.
*
* @param abcIndex ABC indexing
* @param pack Script pack
* @return Highlighted text
@@ -256,6 +263,7 @@ public class DecompilerPool {
/**
* Shuts down the pool.
*
* @throws InterruptedException
*/
public void shutdown() throws InterruptedException {
@@ -265,6 +273,7 @@ public class DecompilerPool {
/**
* Destroys a SWF.
*
* @param swf SWF
*/
public void destroySwf(SWF swf) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash;
/**
* Listener for deobfuscation events.
*
* @author JPEXS
*/
public interface DeobfuscationListener {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,12 +18,14 @@ package com.jpexs.decompiler.flash;
/**
* Listener for disassembly events.
*
* @author JPEXS
*/
public interface DisassemblyListener {
/**
* Called on progress of reading.
*
* @param pos Position
* @param total Total length
*/
@@ -31,6 +33,7 @@ public interface DisassemblyListener {
/**
* Called on progress of deobfuscating.
*
* @param pos Position
* @param total Total length
*/
@@ -38,6 +41,7 @@ public interface DisassemblyListener {
/**
* Called on progress of deobfuscating.
*
* @param pos Position
* @param total Total length
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,6 +20,7 @@ import java.io.IOException;
/**
* Exception thrown when end of stream is reached.
*
* @author JPEXS
*/
public class EndOfStreamException extends IOException {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,12 +18,14 @@ package com.jpexs.decompiler.flash;
/**
* Interface for listening to events.
*
* @author JPEXS
*/
public interface EventListener {
/**
* Handles exporting event.
*
* @param type Event type
* @param index Index of the exported item
* @param count Total count of exported items
@@ -33,6 +35,7 @@ public interface EventListener {
/**
* Handles exported event.
*
* @param type Event type
* @param index Index of the exported item
* @param count Total count of exported items
@@ -42,6 +45,7 @@ public interface EventListener {
/**
* Handles event.
*
* @param event Event name
* @param data Data
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -25,6 +25,7 @@ import java.util.Set;
/**
* Final decompilation processing local d ata.
*
* @author JPEXS
*/
public class FinalProcessLocalData {
@@ -46,6 +47,7 @@ public class FinalProcessLocalData {
/**
* Returns register usage for given setLocal ip.
*
* @param setLocalIp SetLocal ip
* @return Set of getLocal ips
*/
@@ -61,6 +63,7 @@ public class FinalProcessLocalData {
/**
* Constructs new FinalProcessLocalData.
*
* @param loops Loops in the code
*/
public FinalProcessLocalData(List<Loop> loops) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -35,6 +35,7 @@ import java.util.regex.Pattern;
/**
* Identifiers deobfuscation.
*
* @author JPEXS
*/
public class IdentifiersDeobfuscation {
@@ -131,7 +132,7 @@ public class IdentifiersDeobfuscation {
"null", //can be in variable definition
"on", "onClipEvent",
"or", "private", "public", "return",
"set", //can be in variable definition
"set", //can be in variable definition
"static",
//allow as variable:
//"super",
@@ -139,7 +140,7 @@ public class IdentifiersDeobfuscation {
//allow as variable:
//"this",
"throw",
"true", //can be in variable definition
"true", //can be in variable definition
"try",
"typeof", "undefined", "var", "void", "while", "with"
};
@@ -170,12 +171,14 @@ public class IdentifiersDeobfuscation {
"with", "dynamic", "default", "final", "in", "static"};
/**
* Syntactic keywords - can be used as identifiers, but that have special meaning in certain contexts
* Syntactic keywords - can be used as identifiers, but that have special
* meaning in certain contexts
*/
public static final String[] syntacticKeywordsAS3 = {"each", "get", "set", "namespace", "include", "dynamic", "final", "native", "override", "static"};
/**
* Checks if string is reserved word.
*
* @param s String
* @param as3 Is ActionScript3
*/
@@ -195,6 +198,7 @@ public class IdentifiersDeobfuscation {
/**
* TODO: Why do we need this method???
*
* @param s String
* @return True if string is reserved word
*/
@@ -214,6 +218,7 @@ public class IdentifiersDeobfuscation {
/**
* Generates random string.
*
* @param firstUppercase First character uppercase
* @param rndSize Random size
* @return Random string
@@ -239,6 +244,7 @@ public class IdentifiersDeobfuscation {
/**
* Deobfuscates instance names.
*
* @param as3 Is ActionScript3
* @param namesMap Names map
* @param renameType Rename type
@@ -274,6 +280,7 @@ public class IdentifiersDeobfuscation {
/**
* Deobfuscates package names.
*
* @param as3 Is ActionScript3
* @param pkg Package
* @param namesMap Names map
@@ -307,6 +314,7 @@ public class IdentifiersDeobfuscation {
/**
* Deobfuscates name with package.
*
* @param as3 Is ActionScript3
* @param n Name
* @param namesMap Names map
@@ -346,6 +354,7 @@ public class IdentifiersDeobfuscation {
/**
* Checks if string is valid slash path.
*
* @param s String
* @param exceptions Exceptions
* @return True if string is valid slash path
@@ -375,6 +384,7 @@ public class IdentifiersDeobfuscation {
/**
* Checks if string is valid name with slash.
*
* @param s String
* @param exceptions Exceptions
* @return True if string is valid name with slash
@@ -398,6 +408,7 @@ public class IdentifiersDeobfuscation {
/**
* Checks if string is valid name with dot.
*
* @param as3 Is ActionScript3
* @param s String
* @param exceptions Exceptions
@@ -427,6 +438,7 @@ public class IdentifiersDeobfuscation {
/**
* Checks if string is valid name.
*
* @param as3 Is ActionScript3
* @param s String
* @param exceptions Exceptions
@@ -456,6 +468,7 @@ public class IdentifiersDeobfuscation {
/**
* Deobfuscates name.
*
* @param as3 Is ActionScript3
* @param s String
* @param firstUppercase First character uppercase
@@ -512,6 +525,7 @@ public class IdentifiersDeobfuscation {
/**
* Appends obfuscated identifier.
*
* @param s String
* @param writer Writer
* @return Writer
@@ -564,6 +578,7 @@ public class IdentifiersDeobfuscation {
/**
* Escapes obfuscated identifier.
*
* @param s String
* @param writer Writer
* @return Writer
@@ -609,6 +624,7 @@ public class IdentifiersDeobfuscation {
/**
* Escapes obfuscated identifier.
*
* @param s String
* @return Escaped string
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -26,6 +26,7 @@ import java.io.InputStream;
/**
* Information about openable source.
*
* @author JPEXS
*/
public class OpenableSourceInfo {
@@ -62,6 +63,7 @@ public class OpenableSourceInfo {
/**
* Constructs OpenableSourceInfo with empty source
*
* @param fileTitle Title of the file
*/
public OpenableSourceInfo(String fileTitle) {
@@ -71,6 +73,7 @@ public class OpenableSourceInfo {
/**
* Check if the source is empty
*
* @return true if the source is empty
*/
public boolean isEmpty() {
@@ -79,6 +82,7 @@ public class OpenableSourceInfo {
/**
* Constructs OpenableSourceInfo with input stream
*
* @param inputStream Input stream of the source
* @param file File path of the source
* @param fileTitle Title of the file
@@ -89,6 +93,7 @@ public class OpenableSourceInfo {
/**
* Constructs OpenableSourceInfo with input stream
*
* @param inputStream Input stream of the source
* @param file File path of the source
* @param fileTitle Title of the file
@@ -104,6 +109,7 @@ public class OpenableSourceInfo {
/**
* Gets kind of the source.
*
* @return Kind of the source
*/
public OpenableSourceKind getKind() {
@@ -125,6 +131,7 @@ public class OpenableSourceInfo {
/**
* Gets input stream of the source.
*
* @return Input stream of the source
*/
public InputStream getInputStream() {
@@ -133,6 +140,7 @@ public class OpenableSourceInfo {
/**
* Gets file path of the source.
*
* @return File path of the source
*/
public String getFile() {
@@ -141,6 +149,7 @@ public class OpenableSourceInfo {
/**
* Sets file path of the source.
*
* @param file File path of the source
*/
public void setFile(String file) {
@@ -181,6 +190,7 @@ public class OpenableSourceInfo {
/**
* Checks if the source is a bundle.
*
* @return True if the source is a bundle
*/
public boolean isBundle() {
@@ -198,6 +208,7 @@ public class OpenableSourceInfo {
/**
* Gets bundle from the source.
*
* @param noCheck Whether to check the bundle
* @param searchMode Search mode
* @return Bundle or null

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash;
/**
* Openable source kind.
*
* @author JPEXS
*/
public enum OpenableSourceKind {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash;
/**
* Parse exception.
*
* @author JPEXS
*/
public abstract class ParseException extends Exception {
@@ -34,6 +35,7 @@ public abstract class ParseException extends Exception {
/**
* Constructs a new parse exception.
*
* @param text
* @param line
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -23,6 +23,7 @@ import java.util.List;
/**
* Tag list that is read-only.
*
* @author JPEXS
*/
public class ReadOnlyTagList implements Iterable<Tag> {
@@ -39,6 +40,7 @@ public class ReadOnlyTagList implements Iterable<Tag> {
/**
* Constructs read-only tag list.
*
* @param list List of tags
*/
public ReadOnlyTagList(List<Tag> list) {
@@ -47,6 +49,7 @@ public class ReadOnlyTagList implements Iterable<Tag> {
/**
* Returns iterator for tags.
*
* @return Iterator for tags
*/
@Override
@@ -56,6 +59,7 @@ public class ReadOnlyTagList implements Iterable<Tag> {
/**
* Returns number of tags.
*
* @return Number of tags
*/
public int size() {
@@ -64,6 +68,7 @@ public class ReadOnlyTagList implements Iterable<Tag> {
/**
* Returns true if list is empty.
*
* @return True if list is empty
*/
public boolean isEmpty() {
@@ -72,6 +77,7 @@ public class ReadOnlyTagList implements Iterable<Tag> {
/**
* Returns tag at index.
*
* @param index Index
* @return Tag
*/
@@ -81,6 +87,7 @@ public class ReadOnlyTagList implements Iterable<Tag> {
/**
* Returns index of tag.
*
* @param tag Tag
* @return Index of tag or -1 if not found
*/
@@ -90,6 +97,7 @@ public class ReadOnlyTagList implements Iterable<Tag> {
/**
* Converts list to array list.
*
* @return Array list
*/
public ArrayList<Tag> toArrayList() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,6 +20,7 @@ import java.io.IOException;
/**
* Task that can be retried on error.
*
* @author JPEXS
*/
public class RetryTask {
@@ -36,6 +37,7 @@ public class RetryTask {
/**
* Constructs a new RetryTask.
*
* @param r Runnable that can throw IOException
* @param handler Handler for retrying
*/
@@ -46,6 +48,7 @@ public class RetryTask {
/**
* Runs the task.
*
* @throws IOException
* @throws InterruptedException
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,6 +20,7 @@ import java.io.IOException;
/**
* Runnable with IOException and InterruptedException.
*
* @author JPEXS
*/
@FunctionalInterface
@@ -27,6 +28,7 @@ public interface RunnableIOEx {
/**
* Run method.
*
* @throws IOException
* @throws InterruptedException
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash;
/**
* Interface for runnable with result.
*
* @param <T> Type of result
* @author JPEXS
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -29,12 +29,14 @@ import org.xml.sax.helpers.DefaultHandler;
/**
* SWC file.
*
* @author JPEXS
*/
public class SWC extends ZippedBundle {
/**
* Constructs SWC from input stream.
*
* @param is Input stream
* @throws IOException
*/
@@ -44,6 +46,7 @@ public class SWC extends ZippedBundle {
/**
* Constructs SWC from file.
*
* @param filename File
* @throws IOException
*/
@@ -53,6 +56,7 @@ public class SWC extends ZippedBundle {
/**
* Initializes SWC bundle.
*
* @param is Input stream
* @param filename File
* @throws IOException
@@ -94,6 +98,7 @@ public class SWC extends ZippedBundle {
/**
* Returns extension of SWC file.
*
* @return Extension
*/
@Override

File diff suppressed because it is too large Load Diff

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash;
/**
* SWF compression types.
*
* @author JPEXS
*/
public enum SWFCompression {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.treeitems.TreeItem;
/**
* Mark that this tree item contains a SWF file.
*
* @author JPEXS
*/
public interface SWFContainerItem extends TreeItem {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash;
/**
* SWF header information.
*
* @author JPEXS
*/
public class SWFHeader {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -371,6 +371,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Gets charset.
*
* @return Charset
*/
public String getCharset() {
@@ -382,6 +383,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Adds progress listener.
*
* @param listener Progress listener
*/
public void addPercentListener(ProgressListener listener) {
@@ -390,6 +392,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Removes progress listener.
*
* @param listener Progress listener
*/
public void removePercentListener(ProgressListener listener) {
@@ -416,6 +419,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Set maximum percent.
*
* @param percentMax Maximum percent
*/
public void setPercentMax(long percentMax) {
@@ -466,6 +470,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Gets SWF
*
* @return SWF
*/
public SWF getSwf() {
@@ -493,6 +498,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Creates new dump level.
*
* @param name Name
* @param type Type
* @return
@@ -503,6 +509,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Creates new dump level.
*
* @param name Name
* @param type Type
* @param specialType Special type
@@ -535,6 +542,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Ends dump level.
*
* @param value Value
*/
private void endDumpLevel(Object value) {
@@ -551,6 +559,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Ends dump level until.
*
* @param di Dump info
*/
private void endDumpLevelUntil(DumpInfo di) {
@@ -579,9 +588,9 @@ public class SWFInputStream implements AutoCloseable {
bitPos = 0;
}
/**
* Reads one byte from the stream.
*
* @return Byte
* @throws IOException
* @throws EndOfStreamException
@@ -699,6 +708,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Reads one UI24 (Unsigned 24bit integer) value from the stream.
*
* @param name Name
* @return
* @throws IOException
@@ -826,6 +836,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Reads long value from the stream.
*
* @return Long value
* @throws IOException
*/
@@ -1068,6 +1079,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Reads ZLIB compressed bytes from the stream.
*
* @param count Number of bytes to read
* @param name Name
* @return
@@ -1086,6 +1098,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Uncompresses byte array.
*
* @param data Data
* @return Uncompressed data
* @throws IOException
@@ -1096,6 +1109,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Uncompresses byte array.
*
* @param data Data
* @param offset Offset
* @param length Length
@@ -1114,7 +1128,8 @@ public class SWFInputStream implements AutoCloseable {
}
/**
* Reads one EncodedU32 (Encoded unsigned 32bit value) value from the stream.
* Reads one EncodedU32 (Encoded unsigned 32bit value) value from the
* stream.
*
* @param name Name
* @return U32 value
@@ -1147,8 +1162,6 @@ public class SWFInputStream implements AutoCloseable {
return result;
}
/**
* Reads UB[nBits] (Unsigned-bit value) value from the stream.
*
@@ -1272,6 +1285,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Dumps tag.
*
* @param out Output stream
* @param tag Tag
* @param index Index
@@ -1345,6 +1359,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Constructs a new TagResolutionTask.
*
* @param tag Tag stub
* @param dumpInfo Dump info
* @param level Level
@@ -1363,6 +1378,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Call.
*
* @return Tag
* @throws Exception
*/
@@ -1486,6 +1502,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Resolves tag.
*
* @param tag Tag stub
* @param level Level
* @param parallel Parallel
@@ -3770,6 +3787,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Gets number of available bytes in the stream.
*
* @return Number of available bytes
* @throws IOException
*/
@@ -3779,6 +3797,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Gets number of available bits in the stream.
*
* @return Number of available bits
* @throws IOException
*/
@@ -3791,6 +3810,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Gets base stream.
*
* @return Base stream
* @throws IOException
*/
@@ -3803,6 +3823,7 @@ public class SWFInputStream implements AutoCloseable {
/**
* Gets limited stream.
*
* @param limit Limit
* @return Limited stream
* @throws IOException

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -129,6 +129,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Gets current position in the stream.
*
* @return Current position in the stream
*/
public long getPos() {
@@ -162,6 +163,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Writes byte array to the stream.
*
* @param b The data.
* @throws IOException
*/
@@ -174,6 +176,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Writes byte array to the stream.
*
* @param b The data.
* @param off The start offset in the data.
* @param len The number of bytes to write.
@@ -188,6 +191,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Writes ByteArrayRange to the stream.
*
* @param b The data.
* @throws IOException
*/
@@ -199,6 +203,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Aligns to byte position.
*
* @throws IOException
*/
private void alignByte() throws IOException {
@@ -357,6 +362,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Writes long value to the stream.
*
* @param value The value.
* @throws IOException
*/
@@ -374,7 +380,8 @@ public class SWFOutputStream extends OutputStream {
}
/**
* Writes DOUBLE (double precision floating point value) value to the stream.
* Writes DOUBLE (double precision floating point value) value to the
* stream.
*
* @param value DOUBLE value
* @throws IOException
@@ -472,6 +479,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Checks if value fits in SB[nBits] (Signed-bit value).
*
* @param nBits Number of bits
* @param value Value
* @return True if value fits in SB[nBits]
@@ -484,6 +492,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Checks if value fits in UB[nBits] (Unsigned-bit value).
*
* @param nBits Number of bits
* @param value Value
* @return True if value fits in UB[nBits]
@@ -496,6 +505,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Writes NB[nBits] (Bit value) value to the stream.
*
* @param nBits Number of bits which represent value
* @param value Value to write
* @param type Type of value
@@ -579,6 +589,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Truncates value to 31 bits.
*
* @param value Value
* @return Truncated value
*/
@@ -663,6 +674,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Calculates number of bits needed for representing unsigned values.
*
* @param first First Unsigned value
* @param params Next Unsigned values
* @return Number of bits
@@ -678,6 +690,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Calculates number of bits needed for representing unsigned value.
*
* @param value Unsigned value
* @return Number of bits
*/
@@ -710,6 +723,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Enlarges bit count for signed values.
*
* @param currentBitCount Current bit count
* @param value Value
* @return New bit count
@@ -727,6 +741,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Enlarges bit count for unsigned values.
*
* @param currentBitCount Current bit count
* @param value Value
* @return New bit count
@@ -1490,6 +1505,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Calculates SHAPE fill and line bits.
*
* @param value SHAPE value
*/
private void calculateSHAPEFillLineBits(SHAPE value) {
@@ -1981,6 +1997,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Writes ZLIB compressed data to the stream.
*
* @param data Data to compress
* @throws IOException
*/
@@ -1992,6 +2009,7 @@ public class SWFOutputStream extends OutputStream {
/**
* Compresses byte array using ZLIB.
*
* @param data Data to compress
* @return Compressed data
* @throws IOException

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -30,6 +30,7 @@ import java.util.Set;
/**
* SWF search class.
*
* @author JPEXS
*/
public class SWFSearch {
@@ -66,6 +67,7 @@ public class SWFSearch {
/**
* Constructs SWF search object.
*
* @param s Searchable object
* @param noCheck No check for validity
* @param searchMode Search mode
@@ -78,6 +80,7 @@ public class SWFSearch {
/**
* Adds progress listener.
*
* @param l
*/
public void addProgressListener(ProgressListener l) {
@@ -86,6 +89,7 @@ public class SWFSearch {
/**
* Removes progress listener.
*
* @param l
*/
public void removeProgressListener(ProgressListener l) {
@@ -94,6 +98,7 @@ public class SWFSearch {
/**
* Sets progress.
*
* @param p Progress
*/
private void setProgress(int p) {
@@ -124,7 +129,7 @@ public class SWFSearch {
"CFX".getBytes(), // Compressed ScaleForm GFx
"fWS".getBytes(), //Harman encrypted uncompressed Flash,
"cWS".getBytes(), //Harman encrypted ZLib compressed Flash,
"zWS".getBytes() //Harman encrypted LZMA compressed Flash
"zWS".getBytes() //Harman encrypted LZMA compressed Flash
);
int pos = 0;
@@ -185,6 +190,7 @@ public class SWFSearch {
/**
* Gets SWF stream.
*
* @param listener Progress listener
* @param address Address
* @return SWF stream
@@ -202,6 +208,7 @@ public class SWFSearch {
/**
* Gets list of addresses.
*
* @return List of addresses
*/
public Set<Long> getAddresses() {
@@ -210,6 +217,7 @@ public class SWFSearch {
/**
* Gets number of SWF streams.
*
* @return Number of SWF streams
*/
public int length() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash;
/**
* Search mode for searching in SWF file.
*
* @author JPEXS
*/
public enum SearchMode {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -29,6 +29,7 @@ import java.util.Map;
/**
* Local data for source generator.
*
* @author JPEXS
*/
public class SourceGeneratorLocalData implements Serializable {
@@ -176,6 +177,7 @@ public class SourceGeneratorLocalData implements Serializable {
/**
* Gets full class name.
*
* @return Full class name
*/
public String getFullClass() {
@@ -184,6 +186,7 @@ public class SourceGeneratorLocalData implements Serializable {
/**
* Constructs new SourceGeneratorLocalData.
*
* @param registerVars Map of variable name to register number
* @param inFunction In function level
* @param inMethod In method

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,6 +20,7 @@ import java.io.IOException;
/**
* Exception thrown when SWF file cannot be opened.
*
* @author JPEXS
*/
public class SwfOpenException extends IOException {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,12 +20,14 @@ import com.jpexs.decompiler.flash.tags.Tag;
/**
* Listener for tag removal.
*
* @author JPEXS
*/
public interface TagRemoveListener {
/**
* Called when a tag is removed.
*
* @param tag Removed tag
*/
public void tagRemoved(Tag tag);

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,12 +18,14 @@ package com.jpexs.decompiler.flash;
/**
* URL resolver interface.
*
* @author JPEXS
*/
public interface UrlResolver {
/**
* Resolves URL to SWF object.
*
* @param url URL
* @return SWF object or null if not valid
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash;
/**
* Exception thrown when a value is too large for a specific type.
*
* @author JPEXS
*/
public class ValueTooLargeException extends IllegalArgumentException {
@@ -32,7 +33,9 @@ public class ValueTooLargeException extends IllegalArgumentException {
private final Object value;
/**
* Constructs a new ValueTooLargeException with the specified type and value.
* Constructs a new ValueTooLargeException with the specified type and
* value.
*
* @param type Type of the value
* @param value Value that is too large
*/
@@ -44,6 +47,7 @@ public class ValueTooLargeException extends IllegalArgumentException {
/**
* Gets the type of the value.
*
* @return Type of the value
*/
public String getType() {
@@ -52,6 +56,7 @@ public class ValueTooLargeException extends IllegalArgumentException {
/**
* Gets the value that is too large.
*
* @return Value that is too large
*/
public Object getValue() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash;
/**
* FFDec version information.
*
* @author JPEXS
*/
public class Version {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -36,6 +36,7 @@ import java.util.zip.ZipOutputStream;
/**
* Bundle implementation for ZIP files.
*
* @author JPEXS
*/
public class ZippedBundle implements Bundle {
@@ -62,6 +63,7 @@ public class ZippedBundle implements Bundle {
/**
* Constructs a new ZippedBundle from an input stream.
*
* @param is Input stream
* @throws IOException
*/
@@ -71,6 +73,7 @@ public class ZippedBundle implements Bundle {
/**
* Constructs a new ZippedBundle from a file.
*
* @param filename File
* @throws IOException
*/
@@ -80,6 +83,7 @@ public class ZippedBundle implements Bundle {
/**
* Constructs a new ZippedBundle from an input stream and a file.
*
* @param is Input stream
* @param filename File
* @throws IOException
@@ -90,6 +94,7 @@ public class ZippedBundle implements Bundle {
/**
* Initializes the bundle.
*
* @param is Input stream
* @param filename File
* @throws IOException
@@ -116,6 +121,7 @@ public class ZippedBundle implements Bundle {
/**
* Gets the number of entries in the bundle.
*
* @return
*/
@Override
@@ -125,6 +131,7 @@ public class ZippedBundle implements Bundle {
/**
* Gets the keys in the bundle.
*
* @return
*/
@Override
@@ -134,6 +141,7 @@ public class ZippedBundle implements Bundle {
/**
* Gets the input stream for a key.
*
* @param key Key
* @return Input stream
* @throws IOException
@@ -165,6 +173,7 @@ public class ZippedBundle implements Bundle {
/**
* Gets all input streams in the bundle.
*
* @return Map of key to input stream
* @throws IOException
*/
@@ -179,6 +188,7 @@ public class ZippedBundle implements Bundle {
/**
* Gets the extension of the bundle.
*
* @return Extension
*/
@Override
@@ -188,6 +198,7 @@ public class ZippedBundle implements Bundle {
/**
* Gets whether the bundle is read-only.
*
* @return Whether the bundle is read-only
*/
@Override
@@ -195,9 +206,9 @@ public class ZippedBundle implements Bundle {
return this.filename == null || !this.filename.canWrite();
}
/**
* Replaces the input stream for a key.
*
* @param key Key
* @param swfIs New input stream
* @return Whether the operation was successful

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -81,6 +81,7 @@ import java.util.logging.Logger;
/**
* ABC structure.
*
* @author JPEXS
*/
public class ABC implements Openable {
@@ -193,6 +194,7 @@ public class ABC implements Openable {
/**
* Constructs ABC.
*
* @param tag
*/
public ABC(ABCContainerTag tag) {
@@ -202,6 +204,7 @@ public class ABC implements Openable {
/**
* Adds change listener.
*
* @param listener
*/
public void addChangeListener(Runnable listener) {
@@ -210,6 +213,7 @@ public class ABC implements Openable {
/**
* Removes change listener.
*
* @param listener
*/
public void removeChangeListener(Runnable listener) {
@@ -227,6 +231,7 @@ public class ABC implements Openable {
/**
* Gets openable.
*
* @return
*/
@Override
@@ -239,6 +244,7 @@ public class ABC implements Openable {
/**
* Gets SWF.
*
* @return
*/
public SWF getSwf() {
@@ -247,6 +253,7 @@ public class ABC implements Openable {
/**
* Gets list of ABC containers.
*
* @return
*/
public List<ABCContainerTag> getAbcTags() {
@@ -259,6 +266,7 @@ public class ABC implements Openable {
/**
* Adds method body.
*
* @param body
* @return
*/
@@ -270,6 +278,7 @@ public class ABC implements Openable {
/**
* Adds method info.
*
* @param mi
* @return
*/
@@ -280,6 +289,7 @@ public class ABC implements Openable {
/**
* Deletes class.
*
* @param class_info Class index
* @param d Deletion flag
*/
@@ -327,6 +337,7 @@ public class ABC implements Openable {
/**
* Adds method to class.
*
* @param classId Class index
* @param name Method name
* @param isStatic Whether method is static
@@ -367,6 +378,7 @@ public class ABC implements Openable {
/**
* Adds event listener.
*
* @param listener
*/
public void addEventListener(EventListener listener) {
@@ -375,6 +387,7 @@ public class ABC implements Openable {
/**
* Removes event listener.
*
* @param listener
*/
public void removeEventListener(EventListener listener) {
@@ -383,6 +396,7 @@ public class ABC implements Openable {
/**
* Informs listeners.
*
* @param event
* @param data
*/
@@ -394,6 +408,7 @@ public class ABC implements Openable {
/**
* Removes traps (deobfuscation).
*
* @return
* @throws InterruptedException
*/
@@ -403,6 +418,7 @@ public class ABC implements Openable {
/**
* Removes traps (deobfuscation).
*
* @param listener Listener
* @return
* @throws InterruptedException
@@ -420,6 +436,7 @@ public class ABC implements Openable {
/**
* Removes dead code.
*
* @return
* @throws InterruptedException
*/
@@ -429,6 +446,7 @@ public class ABC implements Openable {
/**
* Removes dead code.
*
* @param listener Listener
* @return
* @throws InterruptedException
@@ -443,6 +461,7 @@ public class ABC implements Openable {
/**
* Gets namespace name string usages.
*
* @return Set of string indexes
*/
public Set<Integer> getNsStringUsages() {
@@ -455,6 +474,7 @@ public class ABC implements Openable {
/**
* Gets traits string usages.
*
* @param ret Result
* @param traits Traits
*/
@@ -476,6 +496,7 @@ public class ABC implements Openable {
/**
* Gets string usages.
*
* @return
*/
public Set<Integer> getStringUsages() {
@@ -509,6 +530,7 @@ public class ABC implements Openable {
/**
* Gets string usage type.
*
* @param ret Result - map of string index to usage type
* @param strIndex String index
* @param usageType Usage type
@@ -531,6 +553,7 @@ public class ABC implements Openable {
/**
* Gets string usage types.
*
* @param ret Result - map of string index to usage type
* @param traits Traits
*/
@@ -586,6 +609,7 @@ public class ABC implements Openable {
/**
* Gets string usage types.
*
* @param ret Result - map of string index to usage type
*/
public void getStringUsageTypes(Map<Integer, String> ret) {
@@ -596,6 +620,7 @@ public class ABC implements Openable {
/**
* Renames multiname.
*
* @param multinameIndex
* @param newname
*/
@@ -616,6 +641,7 @@ public class ABC implements Openable {
/**
* Deobfuscates identifiers.
*
* @param stringUsageTypes Map of string index to usage type
* @param stringUsages Set of string indexes
* @param namesMap Map of old name to new name
@@ -715,6 +741,7 @@ public class ABC implements Openable {
/**
* Checks whether the ABC has decimal support.
*
* @return
*/
public boolean hasDecimalSupport() {
@@ -723,6 +750,7 @@ public class ABC implements Openable {
/**
* Sets decimal support.
*
* @param val
*/
public void setDecimalSupport(boolean val) {
@@ -739,6 +767,7 @@ public class ABC implements Openable {
/**
* Checks minimum version.
*
* @param minMajor
* @param minMinor
* @return
@@ -749,6 +778,7 @@ public class ABC implements Openable {
/**
* Checks whether the ABC has float support.
*
* @return
*/
public boolean hasFloatSupport() {
@@ -757,6 +787,7 @@ public class ABC implements Openable {
/**
* Sets float support.
*
* @param val
*/
public void setFloatSupport(boolean val) {
@@ -773,6 +804,7 @@ public class ABC implements Openable {
/**
* Checks whether the ABC has exception support.
*
* @return
*/
public boolean hasExceptionSupport() {
@@ -781,6 +813,7 @@ public class ABC implements Openable {
/**
* Constructs ABC.
*
* @param ais ABC input stream
* @param swf SWF
* @param tag ABC container tag
@@ -792,6 +825,7 @@ public class ABC implements Openable {
/**
* Constructs ABC.
*
* @param ais ABC input stream
* @param swf SWF
* @param tag ABC container tag
@@ -824,6 +858,7 @@ public class ABC implements Openable {
/**
* Reads ABC from input stream.
*
* @param ais ABC input stream
* @param swf SWF
* @throws IOException
@@ -1056,6 +1091,7 @@ public class ABC implements Openable {
/**
* Saves ABC to stream.
*
* @param os Output stream
* @throws IOException
*/
@@ -1175,6 +1211,7 @@ public class ABC implements Openable {
/**
* Finds method info.
*
* @param methodInfo Method info
* @return MethodBody or null
*/
@@ -1184,6 +1221,7 @@ public class ABC implements Openable {
/**
* Finds method info.
*
* @param methodInfo Method info index
* @return MethodBody or null
*/
@@ -1193,6 +1231,7 @@ public class ABC implements Openable {
/**
* Finds method body index.
*
* @param methodInfo Method info
* @return Method body index or -1
*/
@@ -1202,6 +1241,7 @@ public class ABC implements Openable {
/**
* Finds method body index.
*
* @param methodInfo Method info index
* @return Method body index or -1
*/
@@ -1211,6 +1251,7 @@ public class ABC implements Openable {
/**
* Finds body of class initializer by class.
*
* @param classNameWithSuffix Class name with suffix
* @return MethodBody or null
*/
@@ -1229,6 +1270,7 @@ public class ABC implements Openable {
/**
* Finds body of instance initializer by class.
*
* @param classNameWithSuffix Class name with suffix
* @return MethodBody or null
*/
@@ -1247,6 +1289,7 @@ public class ABC implements Openable {
/**
* Finds body by class and name.
*
* @param classNameWithSuffix Class name with suffix
* @param methodNameWithSuffix Method name with suffix
* @return MethodBody or null
@@ -1286,6 +1329,7 @@ public class ABC implements Openable {
/**
* Checks whether the trait id is static.
*
* @param classIndex Class index
* @param traitId Trait id
* @return True if static
@@ -1304,6 +1348,7 @@ public class ABC implements Openable {
/**
* Finds trait by trait id.
*
* @param classIndex Class index
* @param traitId Trait id
* @return Trait or null
@@ -1328,6 +1373,7 @@ public class ABC implements Openable {
/**
* Finds method id by trait id.
*
* @param classIndex Class index
* @param traitId Trait id
* @return Method id or -1
@@ -1367,6 +1413,7 @@ public class ABC implements Openable {
/**
* Gets namespace map.
*
* @return Map from namespace name trait DottedChain.
*/
private Map<String, DottedChain> getNamespaceMap() {
@@ -1392,6 +1439,7 @@ public class ABC implements Openable {
/**
* Gets deobfuscation object.
*
* @return AVM2Deobfuscation
*/
private AVM2Deobfuscation getDeobfuscation() {
@@ -1404,6 +1452,7 @@ public class ABC implements Openable {
/**
* Gets method indexing object.
*
* @return ABCMethodIndexing
*/
public final ABCMethodIndexing getMethodIndexing() {
@@ -1423,6 +1472,7 @@ public class ABC implements Openable {
/**
* Converts namespace value to name.
*
* @param valueStr Namespace value
* @return Namespace name as DottedChain
*/
@@ -1445,6 +1495,7 @@ public class ABC implements Openable {
/**
* Gets script packs.
*
* @param packagePrefix Package prefix to search
* @param allAbcs List of all ABCs
* @return List of ScriptPack
@@ -1461,6 +1512,7 @@ public class ABC implements Openable {
/**
* Dump ABC to output stream.
*
* @param os
*/
public void dump(OutputStream os) {
@@ -1489,6 +1541,7 @@ public class ABC implements Openable {
/**
* Finds multiname definition.
*
* @param multinameIndex Multiname index
* @return List of MultinameUsage
*/
@@ -1505,6 +1558,7 @@ public class ABC implements Openable {
/**
* Finds multiname usage of namespace.
*
* @param namespaceIndex Namespace index
* @return List of MultinameUsage
*/
@@ -1520,6 +1574,7 @@ public class ABC implements Openable {
/**
* Finds multiname usage.
*
* @param multinameIndex Multiname index
* @param exactMatch Whether to match exactly
* @return List of MultinameUsage
@@ -1537,6 +1592,7 @@ public class ABC implements Openable {
/**
* Gets colliding usages of multinames. For example same name
* consts/vars/methods or same class names. Mostly in obfuscated files.
*
* @return Set of MultinameUsage
*/
public Set<MultinameUsage> getCollidingMultinameUsages() {
@@ -1612,6 +1668,7 @@ public class ABC implements Openable {
/**
* Finds method info by name in class.
*
* @param classId Class id
* @param methodNameWithSuffix Method name with suffix
* @return Method info index or -1
@@ -1631,6 +1688,7 @@ public class ABC implements Openable {
/**
* Finds method body by name in class.
*
* @param classId Class id
* @param methodNameWithSuffix Method name with suffix
* @return Method body index or -1
@@ -1650,6 +1708,7 @@ public class ABC implements Openable {
/**
* Finds method body by method name in class.
*
* @param className Class name
* @param methodName Method name
* @return Method body index or -1
@@ -1661,6 +1720,7 @@ public class ABC implements Openable {
/**
* Finds class by name.
*
* @param name Class name
* @return Class index or -1
*/
@@ -1671,6 +1731,7 @@ public class ABC implements Openable {
/**
* Finds class by name.
*
* @param nameWithSuffix Class name with suffix
* @return Class index or -1
*/
@@ -1689,6 +1750,7 @@ public class ABC implements Openable {
/**
* Finds script packs by path.
*
* @param name Name
* @param allAbcs List of all ABCs
* @return List of ScriptPack
@@ -1727,6 +1789,7 @@ public class ABC implements Openable {
/**
* Finds script pack by path.
*
* @param name Name
* @param allAbcs List of all ABCs
* @return ScriptPack or null
@@ -1743,6 +1806,7 @@ public class ABC implements Openable {
/**
* Gets global trait id.
*
* @param type Trait type
* @param isStatic Whether static
* @param classIndex Class index
@@ -1775,6 +1839,7 @@ public class ABC implements Openable {
/**
* Removes class from traits.
*
* @param traits Traits
* @param index Trait index
*/
@@ -1793,6 +1858,7 @@ public class ABC implements Openable {
/**
* Moves class in traits.
*
* @param traits Traits
* @param oldIndex Old index
* @param newIndex New index
@@ -1810,6 +1876,7 @@ public class ABC implements Openable {
/**
* Moves class index.
*
* @param oldIndex Old index
* @param newIndex New index
* @param currentIndex Current index
@@ -1833,6 +1900,7 @@ public class ABC implements Openable {
/**
* Moves class.
*
* @param oldIndex Old index
* @param newIndex New index
*/
@@ -1865,6 +1933,7 @@ public class ABC implements Openable {
/**
* Adds class.
*
* @param ci Class info
* @param ii Instance info
* @param index Class index
@@ -1893,6 +1962,7 @@ public class ABC implements Openable {
/**
* Adds class in traits.
*
* @param traits Traits
* @param index Class index
*/
@@ -1911,6 +1981,7 @@ public class ABC implements Openable {
/**
* Reorganizes classes.
*
* @param classIndexMap Map from old index to new index
*/
public void reorganizeClasses(Map<Integer, Integer> classIndexMap) {
@@ -1946,6 +2017,7 @@ public class ABC implements Openable {
/**
* Reorganizes classes in traits.
*
* @param traits Traits
* @param classIndexMap Map from old index to new index
*/
@@ -1964,6 +2036,7 @@ public class ABC implements Openable {
/**
* Removes class.
*
* @param index Class index
*/
public void removeClass(int index) {
@@ -1990,6 +2063,7 @@ public class ABC implements Openable {
/**
* Removes method from traits.
*
* @param traits Traits
* @param index Method index
*/
@@ -2017,6 +2091,7 @@ public class ABC implements Openable {
/**
* Removes method.
*
* @param index Method index
*/
public void removeMethod(int index) {
@@ -2071,6 +2146,7 @@ public class ABC implements Openable {
/**
* Replaces script pack.
*
* @param replacer Replacer
* @param pack Script pack
* @param as ActionScript
@@ -2150,6 +2226,7 @@ public class ABC implements Openable {
/**
* Packs traits.
*
* @param traits Traits
*/
private void packTraits(Traits traits) {
@@ -2471,6 +2548,7 @@ public class ABC implements Openable {
/**
* Merges traits.
*
* @param secondTraits Second traits
* @param mergeMultinameMap Multiname index mapping
* @param mergeStringMap String index mapping
@@ -2521,6 +2599,7 @@ public class ABC implements Openable {
/**
* Merges trait.
*
* @param secondTrait Second trait
* @param mergeMultinameMap Multiname index mapping
* @param mergeMethodInfoMap Method info index mapping
@@ -2539,6 +2618,7 @@ public class ABC implements Openable {
/**
* Merges trait.
*
* @param secondTrait Second trait
* @param mergeMultinameMap Multiname index mapping
* @param mergeStringMap String index mapping
@@ -2617,6 +2697,7 @@ public class ABC implements Openable {
/**
* Merges trait.
*
* @param secondTrait Second trait
* @param mergeMultinameMap Multiname index mapping
* @param mergeMethodInfoMap Method info index mapping
@@ -2635,6 +2716,7 @@ public class ABC implements Openable {
/**
* Merges trait.
*
* @param secondTrait Second trait
* @param mergeClassMap Class index mapping
* @param mergeMultinameMap Multiname index mapping
@@ -2653,6 +2735,7 @@ public class ABC implements Openable {
/**
* Finds custom namespace name of namespace.
*
* @param link_ns_index Namespace index
* @return Custom namespace name
*/
@@ -2671,6 +2754,7 @@ public class ABC implements Openable {
/**
* Finds custom namespace name of multiname.
*
* @param m Multiname
* @return Custom namespace name
*/
@@ -2706,6 +2790,7 @@ public class ABC implements Openable {
/**
* Gets file.
*
* @return File or null
*/
@Override
@@ -2715,6 +2800,7 @@ public class ABC implements Openable {
/**
* Gets file title.
*
* @return File title or file when null or null
*/
@Override
@@ -2727,6 +2813,7 @@ public class ABC implements Openable {
/**
* Gets title or short file name.
*
* @return Title or short file name
*/
@Override
@@ -2738,8 +2825,8 @@ public class ABC implements Openable {
}
/**
* Gets short path title.
* (Include path from parents like DefineBinaryData)
* Gets short path title. (Include path from parents like DefineBinaryData)
*
* @return Short path title
*/
@Override
@@ -2754,6 +2841,7 @@ public class ABC implements Openable {
/**
* Gets short file name.
*
* @return Short file name
*/
@Override
@@ -2763,6 +2851,7 @@ public class ABC implements Openable {
/**
* Gets full path title.
*
* @return Full path title
*/
@Override
@@ -2777,6 +2866,7 @@ public class ABC implements Openable {
/**
* Gets modified flag.
*
* @return
*/
@Override
@@ -2786,6 +2876,7 @@ public class ABC implements Openable {
/**
* Sets openable list.
*
* @param openableList Openable list
*/
@Override
@@ -2796,6 +2887,7 @@ public class ABC implements Openable {
/**
* Gets openable list.
*
* @return Openable list
*/
@Override
@@ -2805,6 +2897,7 @@ public class ABC implements Openable {
/**
* To string.
*
* @return
*/
@Override
@@ -2814,6 +2907,7 @@ public class ABC implements Openable {
/**
* Saves ABC to stream.
*
* @param os Output stream
* @throws IOException
*/
@@ -2824,6 +2918,7 @@ public class ABC implements Openable {
/**
* Sets file.
*
* @param file File
*/
@Override
@@ -2850,6 +2945,7 @@ public class ABC implements Openable {
/**
* Checks whether the ABC has versioned API.
*
* @return True if the ABC has versioned API
*/
public boolean isApiVersioned() {
@@ -2864,6 +2960,7 @@ public class ABC implements Openable {
/**
* Gets data size.
*
* @return Data size
*/
public long getDataSize() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -41,6 +41,7 @@ import java.io.IOException;
/**
* ABC input stream.
*
* @author JPEXS
*/
public class ABCInputStream implements AutoCloseable {
@@ -93,6 +94,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Stops buffering and returns buffered bytes.
*
* @return Buffered bytes
*/
public byte[] stopBuffer() {
@@ -106,6 +108,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Creates new ABC input stream
*
* @param is Input stream
*/
public ABCInputStream(MemoryInputStream is) {
@@ -124,6 +127,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Creates new dump level.
*
* @param name Name
* @param type Type
* @return New DumpInfo
@@ -134,6 +138,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Creates new dump level.
*
* @param name Name
* @param type Type
* @param specialType Special type
@@ -162,6 +167,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Ends dump level.
*
* @param value Value
*/
public void endDumpLevel(Object value) {
@@ -174,6 +180,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Ends dump level until specified dump info.
*
* @param di Dump info
*/
public void endDumpLevelUntil(DumpInfo di) {
@@ -186,6 +193,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads byte from the stream.
*
* @return Byte
* @throws IOException
*/
@@ -207,6 +215,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads byte from the stream.
*
* @param name Name
* @return Byte
* @throws IOException
@@ -220,6 +229,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads bytes from the stream.
*
* @param b Bytes
* @return Number of bytes read
* @throws IOException
@@ -249,6 +259,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads U8 from the stream.
*
* @param name Name
* @return U8
* @throws IOException
@@ -262,6 +273,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads U32 from the stream.
*
* @return U32
* @throws IOException
*/
@@ -284,6 +296,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads U32 from the stream.
*
* @param name Name
* @return U32
* @throws IOException
@@ -297,6 +310,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads U30 from the stream.
*
* @return U30
* @throws IOException
*/
@@ -308,6 +322,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads U30 from the stream.
*
* @param name Name
* @return U30
* @throws IOException
@@ -321,6 +336,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads S24 from the stream.
*
* @param name Name
* @return S24
* @throws IOException
@@ -339,6 +355,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads U16 from the stream.
*
* @param name Name
* @return U16
* @throws IOException
@@ -352,6 +369,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads S32 from the stream.
*
* @param name Name
* @return S32
* @throws IOException
@@ -383,6 +401,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Gets available bytes in the stream.
*
* @return Available bytes
* @throws IOException
*/
@@ -392,6 +411,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads long from the stream.
*
* @return Long
* @throws IOException
*/
@@ -410,6 +430,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads double from the stream.
*
* @param name Name
* @return Double
* @throws IOException
@@ -424,6 +445,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Safely reads bytes from the stream.
*
* @param count Count
* @param data Data
* @throws IOException
@@ -436,6 +458,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads namespace from the stream.
*
* @param name Name
* @return Namespace
* @throws IOException
@@ -456,6 +479,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads multiname from the stream.
*
* @param name Name
* @return Multiname
* @throws IOException
@@ -499,6 +523,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads method info from the stream.
*
* @param name Name
* @return Method info
* @throws IOException
@@ -537,6 +562,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads trait from the stream.
*
* @param name Name
* @return Trait
* @throws IOException
@@ -604,6 +630,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads traits from the stream.
*
* @param name Name
* @return Traits
* @throws IOException
@@ -621,6 +648,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads bytes from the stream.
*
* @param count Count
* @return Bytes
* @throws IOException
@@ -635,6 +663,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads bytes from the stream.
*
* @param count Count
* @param name Name
* @param specialType Special type
@@ -650,6 +679,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads decimal from the stream.
*
* @param name Name
* @return Decimal
* @throws IOException
@@ -663,6 +693,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads float from the stream.
*
* @param name Name
* @return Float
* @throws IOException
@@ -677,6 +708,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads float4 from the stream.
*
* @param name Name
* @return Float4
* @throws IOException
@@ -694,6 +726,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads instance info from the stream.
*
* @param name Name
* @return Instance info
* @throws IOException
@@ -720,6 +753,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Reads string from the stream.
*
* @param name Name
* @return String
* @throws IOException
@@ -746,6 +780,7 @@ public class ABCInputStream implements AutoCloseable {
/**
* Gets current position in the stream.
*
* @return Position
*/
public long getPosition() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -32,6 +32,7 @@ import java.util.Map;
/**
* ABC method indexing.
*
* @author JPEXS
*/
public class ABCMethodIndexing {
@@ -48,6 +49,7 @@ public class ABCMethodIndexing {
/**
* Constructs ABC method indexing.
*
* @param abc ABC
*/
public ABCMethodIndexing(ABC abc) {
@@ -57,6 +59,7 @@ public class ABCMethodIndexing {
/**
* Creates body index from method index map.
*
* @param abc ABC
*/
public final void createBodyIdxFromMethodIdxMap(ABC abc) {
@@ -72,6 +75,7 @@ public class ABCMethodIndexing {
/**
* Finds method body index for method info.
*
* @param methodInfo Method info
* @return Method body index or -1 if not found
*/
@@ -86,6 +90,7 @@ public class ABCMethodIndexing {
/**
* Finds method body index for method info.
*
* @param methodInfo Method info index
* @return Method body index or -1 if not found
*/
@@ -100,6 +105,7 @@ public class ABCMethodIndexing {
/**
* Finds method body for method info.
*
* @param methodInfo Method info
* @return Method body or null if not found
*/
@@ -114,6 +120,7 @@ public class ABCMethodIndexing {
/**
* Finds method body for method info.
*
* @param methodInfo Method info index
* @return Method body or null if not found
*/
@@ -128,6 +135,7 @@ public class ABCMethodIndexing {
/**
* Finds method traits.
*
* @param pack Script pack
* @param bodyIndex Method body index
* @return Method traits
@@ -146,6 +154,7 @@ public class ABCMethodIndexing {
/**
* Finds traits.
*
* @param abc ABC
* @param trait Trait
* @param methodInfo Method info index

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,12 +20,14 @@ import java.io.IOException;
/**
* ABC open exception.
*
* @author JPEXS
*/
public class ABCOpenException extends IOException {
/**
* Constructs a new ABCOpenException with the specified detail message.
*
* @param message Detail message
*/
public ABCOpenException(String message) {
@@ -33,7 +35,9 @@ public class ABCOpenException extends IOException {
}
/**
* Constructs a new ABCOpenException with the specified detail message and cause.
* Constructs a new ABCOpenException with the specified detail message and
* cause.
*
* @param message Detail message
* @param cause Cause
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -34,6 +34,7 @@ import java.io.OutputStream;
/**
* ABC output stream.
*
* @author JPEXS
*/
public class ABCOutputStream extends OutputStream {
@@ -50,6 +51,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Constructs ABC output stream.
*
* @param os Output stream
*/
public ABCOutputStream(OutputStream os) {
@@ -58,6 +60,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Returns current position.
*
* @return Current position
*/
public long getPosition() {
@@ -66,6 +69,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes a byte to the output stream.
*
* @param b The byte to write.
* @throws IOException
*/
@@ -77,6 +81,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes a byte array to the output stream.
*
* @param data The data to write.
* @throws IOException
*/
@@ -88,6 +93,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes a byte array to the output stream.
*
* @param b The data to write.
* @param off The start offset in the data.
* @param len The number of bytes to write.
@@ -101,6 +107,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes U30 to the output stream.
*
* @param value Value to write
* @throws IOException
*/
@@ -130,6 +137,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes U32 to the output stream.
*
* @param value Value to write
* @throws IOException
*/
@@ -151,6 +159,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes S24 to the output stream.
*
* @param value Value to write
* @throws IOException
*/
@@ -167,6 +176,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes S32 to the output stream.
*
* @param value Value to write
* @throws IOException
*/
@@ -204,6 +214,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes long to the output stream.
*
* @param value Value to write
* @throws IOException
*/
@@ -222,6 +233,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes double to the output stream.
*
* @param value Value to write
* @throws IOException
*/
@@ -231,6 +243,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes float to the output stream.
*
* @param value Value to write
* @throws IOException
*/
@@ -240,6 +253,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes float4 to the output stream.
*
* @param value Value to write
* @throws IOException
*/
@@ -252,6 +266,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes U8 to the output stream.
*
* @param value Value to write
* @throws IOException
*/
@@ -261,6 +276,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes U16 to the output stream.
*
* @param value Value to write
* @throws IOException
*/
@@ -271,6 +287,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes String to the output stream.
*
* @param s String to write
* @throws IOException
*/
@@ -282,6 +299,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes Namespace to the output stream.
*
* @param ns Namespace to write
* @throws IOException
*/
@@ -302,6 +320,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes Multiname to the output stream.
*
* @param m Multiname to write
* @throws IOException
*/
@@ -329,6 +348,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes MethodInfo to the output stream.
*
* @param mi MethodInfo to write
* @throws IOException
*/
@@ -357,6 +377,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes Trait to the output stream.
*
* @param t Trait to write
* @throws IOException
*/
@@ -397,6 +418,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes Traits to the output stream.
*
* @param t Traits to write
* @throws IOException
*/
@@ -409,6 +431,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes InstanceInfo to the output stream.
*
* @param ii InstanceInfo to write
* @throws IOException
*/
@@ -429,6 +452,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Writes Decimal to the output stream.
*
* @param value Decimal to write
* @throws IOException
*/
@@ -438,6 +462,7 @@ public class ABCOutputStream extends OutputStream {
/**
* Gets U30 byte length.
*
* @param value Value
* @return
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -40,6 +40,7 @@ public class ABCVersion implements Comparable<ABCVersion> {
/**
* Constructs new ABCVersion
*
* @param major Major version
* @param minor Minor version
*/
@@ -50,8 +51,10 @@ public class ABCVersion implements Comparable<ABCVersion> {
/**
* Compares ABCVersion with another ABCVersion
*
* @param o the object to be compared.
* @return Negative number if this version is lower, 0 if versions are equal, positive number if this version is higher
* @return Negative number if this version is lower, 0 if versions are
* equal, positive number if this version is higher
*/
@Override
public int compareTo(ABCVersion o) {
@@ -63,6 +66,7 @@ public class ABCVersion implements Comparable<ABCVersion> {
/**
* Returns string representation of ABCVersion
*
* @return
*/
@Override
@@ -72,6 +76,7 @@ public class ABCVersion implements Comparable<ABCVersion> {
/**
* Returns hash code of ABCVersion
*
* @return
*/
@Override
@@ -84,6 +89,7 @@ public class ABCVersion implements Comparable<ABCVersion> {
/**
* Equals method
*
* @param obj
* @return
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -32,31 +32,35 @@ public @interface ABCVersionRequirements {
/**
* Minimum minor version.
*
* @return
*/
int minMinor() default 0;
/**
* Maximum minor version.
*
* @return
*/
int maxMinor() default 0;
/**
* Maximum major version.
*
* @return
*/
int maxMajor() default 0;
/**
* Minimum major version.
*
* @return
*/
int minMajor() default 0;
/**
* Exact minor version.
*
* @return
*/
int exactMinor() default 0;

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -39,6 +39,7 @@ import java.util.Set;
/**
* AVM2 local data.
*
* @author JPEXS
*/
public class AVM2LocalData extends BaseLocalData {
@@ -149,8 +150,8 @@ public class AVM2LocalData extends BaseLocalData {
public Map<Integer, GraphPart> pushDefaultPart = new HashMap<>();
/**
* Mapping from finally index to finally kind
* See AVM2Graph.FINALLY_KIND_* constants.
* Mapping from finally index to finally kind See AVM2Graph.FINALLY_KIND_*
* constants.
*/
public Map<Integer, Integer> finallyKinds = new HashMap<>();
@@ -175,7 +176,8 @@ public class AVM2LocalData extends BaseLocalData {
public Integer scriptIndex;
/**
* Local registers assignment ips. Maps register index to ip where it was assigned.
* Local registers assignment ips. Maps register index to ip where it was
* assigned.
*/
public HashMap<Integer, Integer> localRegAssignmentIps;
@@ -228,6 +230,7 @@ public class AVM2LocalData extends BaseLocalData {
/**
* Returns set of getLocal positions for given setLocal position
*
* @param setLocalPos SetLocal position
* @return Set of getLocal positions
*/
@@ -243,6 +246,7 @@ public class AVM2LocalData extends BaseLocalData {
/**
* Constructs a new AVM2LocalData from another AVM2LocalData
*
* @param localData Another AVM2LocalData
*/
public AVM2LocalData(AVM2LocalData localData) {
@@ -287,6 +291,7 @@ public class AVM2LocalData extends BaseLocalData {
/**
* Returns constant pool
*
* @return Constant pool
*/
public AVM2ConstantPool getConstants() {
@@ -295,6 +300,7 @@ public class AVM2LocalData extends BaseLocalData {
/**
* Returns ABC method infos
*
* @return List of MethodInfo
*/
public List<MethodInfo> getMethodInfo() {
@@ -303,6 +309,7 @@ public class AVM2LocalData extends BaseLocalData {
/**
* Returns ABC instance infos
*
* @return List of InstanceInfo
*/
public List<InstanceInfo> getInstanceInfo() {
@@ -311,6 +318,7 @@ public class AVM2LocalData extends BaseLocalData {
/**
* Returns ABC script infos
*
* @return List of ScriptInfo
*/
public List<ScriptInfo> getScriptInfo() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -22,6 +22,7 @@ import java.util.Objects;
/**
* Class path
*
* @author JPEXS
*/
public class ClassPath implements Serializable {
@@ -43,6 +44,7 @@ public class ClassPath implements Serializable {
/**
* Constructs a new class path
*
* @param packageStr Package name
* @param className Class name
* @param namespaceSuffix Namespace suffix
@@ -55,6 +57,7 @@ public class ClassPath implements Serializable {
/**
* To string
*
* @return String
*/
@Override
@@ -64,6 +67,7 @@ public class ClassPath implements Serializable {
/**
* To raw string
*
* @return Raw string
*/
public String toRawString() {
@@ -72,6 +76,7 @@ public class ClassPath implements Serializable {
/**
* Hash code
*
* @return Hash code
*/
@Override
@@ -85,6 +90,7 @@ public class ClassPath implements Serializable {
/**
* Equals
*
* @param obj
* @return True if equals
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -22,6 +22,7 @@ import java.io.OutputStream;
/**
* Output stream that copies data to another output stream.
*
* @author JPEXS
*/
public class CopyOutputStream extends OutputStream {
@@ -63,6 +64,7 @@ public class CopyOutputStream extends OutputStream {
/**
* Constructs a new CopyOutputStream.
*
* @param os Output stream to copy data to
* @param is Input stream to compare data with
*/
@@ -73,6 +75,7 @@ public class CopyOutputStream extends OutputStream {
/**
* Writes a byte to the output stream.
*
* @param b Byte to write
* @throws IOException If an I/O error occurs
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,12 +20,14 @@ import com.jpexs.helpers.Helper;
/**
* Streams are not the same exception.
*
* @author JPEXS
*/
public class NotSameException extends RuntimeException {
/**
* Constructs a new NotSameException with specified position.
*
* @param pos Position
*/
public NotSameException(long pos) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc;
/**
* Rename type enum.
*
* @author JPEXS
*/
public enum RenameType {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -74,10 +74,11 @@ import java.util.logging.Level;
import java.util.logging.Logger;
/**
* Script pack class.
* A script pack is a collection of traits that are in the same script.
* It can be a simple script pack (contains only one externally visible definition)
* or a compound script pack (contains more than one externally visible definitions).
* Script pack class. A script pack is a collection of traits that are in the
* same script. It can be a simple script pack (contains only one externally
* visible definition) or a compound script pack (contains more than one
* externally visible definitions).
*
* @author JPEXS
*/
public class ScriptPack extends AS3ClassTreeItem {
@@ -113,8 +114,9 @@ public class ScriptPack extends AS3ClassTreeItem {
private final ClassPath path;
/**
* Whether the scriptpack is simple. ScriptPack can be either simple or compound.
* Compound = Contains more than one externally visible definitions.
* Whether the scriptpack is simple. ScriptPack can be either simple or
* compound. Compound = Contains more than one externally visible
* definitions.
*/
public boolean isSimple = false;
@@ -125,6 +127,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Gets openable.
*
* @return Openable
*/
@Override
@@ -134,6 +137,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Gets class path.
*
* @return Class path
*/
public ClassPath getClassPath() {
@@ -142,6 +146,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Constructs a new script pack.
*
* @param path Class path
* @param abc ABC file
* @param allAbcs All ABC files
@@ -159,6 +164,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Gets path package.
*
* @return Dotted chain
*/
public DottedChain getPathPackage() {
@@ -175,6 +181,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Gets public trait.
*
* @return Trait or null if not found
*/
public Trait getPublicTrait() {
@@ -190,6 +197,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Gets path script name.
*
* @return Script name
*/
public String getPathScriptName() {
@@ -206,6 +214,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Gets export file.
*
* @param directory Directory
* @param extension Extension including dot
* @return File
@@ -221,6 +230,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Gets export file.
*
* @param directory Directory
* @param exportSettings Export settings
* @return File
@@ -235,6 +245,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Converts the script pack.
*
* @param abcIndex Abc indexing
* @param writer Writer
* @param traits Traits
@@ -278,6 +289,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Append script to writer.
*
* @param abcIndex Abc indexing
* @param writer Writer
* @param traits Traits
@@ -349,6 +361,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Converts the script pack to source.
*
* @param abcIndex Abc indexing
* @param writer Writer
* @param traits Traits
@@ -401,6 +414,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Exports the script pack.
*
* @param abcIndex Abc indexing
* @param file File
* @param exportSettings Export settings
@@ -426,7 +440,7 @@ public class ScriptPack extends AS3ClassTreeItem {
convertData.ignoreFrameScripts = exportSettings.ignoreFrameScripts;
convertData.exportEmbed = exportSettings.exportEmbed;
convertData.exportEmbedFlaMode = exportSettings.exportEmbedFlaMode;
convertData.assetsDir = exportSettings.assetsDir;
convertData.assetsDir = exportSettings.assetsDir;
toSource(abcIndex, writer2, abc.script_info.get(scriptIndex).traits.traits, convertData, exportSettings.mode, parallel, exportSettings.ignoreFrameScripts);
} catch (FileNotFoundException ex) {
logger.log(Level.SEVERE, "The file path is probably too long", ex);
@@ -437,6 +451,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Hash code.
*
* @return Hash code
*/
@Override
@@ -450,6 +465,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Equals.
*
* @param obj Object
* @return True if equals
*/
@@ -473,6 +489,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Gets modified flag.
*
* @return True if modified
*/
@Override
@@ -493,7 +510,6 @@ public class ScriptPack extends AS3ClassTreeItem {
abc.script_info.get(scriptIndex).setModified(false);
}
/**
* Label with address.
*/
@@ -506,6 +522,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Constructs a new label.
*
* @param addr Address
*/
public Label(long addr) {
@@ -527,6 +544,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Injects debugfile, debugline instructions into the code.
*
* @param directoryPath Directory path
* @param swfHash SWF identifier
*/
@@ -827,6 +845,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Injects P-code debugfile, debugline instructions into the code.
*
* @param abcIndex Abc indexing
* @param swfHash SWF identifier
*/
@@ -917,6 +936,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Gets method ids.
*
* @param methodInfos Result list of MethodIds
*/
public void getMethodInfos(List<MethodId> methodInfos) {
@@ -932,6 +952,7 @@ public class ScriptPack extends AS3ClassTreeItem {
/**
* Deletes the script pack.
*
* @param abc ABC file
* @param d Whether to delete
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -40,6 +40,7 @@ import java.util.logging.Logger;
/**
* AVM2 constant pool.
*
* @author JPEXS
*/
public class AVM2ConstantPool implements Cloneable {
@@ -134,6 +135,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets cached multiname with namespace dottedchain.
*
* @param multiName Multiname
* @return Dotted chain
*/
@@ -143,6 +145,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Caches multiname with namespace dotted chain.
*
* @param multiName Multiname
* @param multinameWithNamespace Dotted chain
*/
@@ -166,6 +169,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list has at least one - null - element.
*
* @param list List
*/
private void ensureDefault(List<?> list) {
@@ -176,6 +180,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list of integers has the initial capacity.
*
* @param capacity Capacity
*/
public void ensureIntCapacity(int capacity) {
@@ -187,6 +192,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list of namespaces has the initial capacity.
*
* @param capacity Capacity
*/
public void ensureNamespaceCapacity(int capacity) {
@@ -198,6 +204,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list of namespace sets has the initial capacity.
*
* @param capacity Capacity
*/
public void ensureNamespaceSetCapacity(int capacity) {
@@ -209,6 +216,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list of multinames has the initial capacity.
*
* @param capacity Capacity
*/
public void ensureMultinameCapacity(int capacity) {
@@ -220,6 +228,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list of unsigned integers has the initial capacity.
*
* @param capacity Capacity
*/
public void ensureUIntCapacity(int capacity) {
@@ -231,6 +240,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list of doubles has the initial capacity.
*
* @param capacity Capacity
*/
public void ensureDoubleCapacity(int capacity) {
@@ -242,6 +252,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list of decimals has the initial capacity.
*
* @param capacity Capacity
*/
public void ensureDecimalCapacity(int capacity) {
@@ -253,6 +264,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list of floats has the initial capacity.
*
* @param capacity Capacity
*/
public void ensureFloatCapacity(int capacity) {
@@ -264,6 +276,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list of float4 has the initial capacity.
*
* @param capacity Capacity
*/
public void ensureFloat4Capacity(int capacity) {
@@ -275,6 +288,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Ensures that list of strings has the initial capacity.
*
* @param capacity Capacity
*/
public void ensureStringCapacity(int capacity) {
@@ -286,6 +300,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds an integer to the constant pool.
*
* @param value Value
* @return Index
*/
@@ -298,6 +313,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds a namespace to the constant pool.
*
* @param ns Namespace
* @return Index
*/
@@ -309,6 +325,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds a namespace to the constant pool.
*
* @param kind Kind
* @param nameIndex Name index
* @return Index
@@ -319,6 +336,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds a namespace set to the constant pool.
*
* @param nss Namespace set
* @return Index
*/
@@ -330,6 +348,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds a multiname to the constant pool.
*
* @param m Multiname
* @return Index
*/
@@ -341,6 +360,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds an unsigned integer to the constant pool.
*
* @param value Value
* @return Index
*/
@@ -353,6 +373,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds a double to the constant pool.
*
* @param value Value
* @return Index
*/
@@ -364,6 +385,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds a decimal to the constant pool.
*
* @param value Value
* @return Index
*/
@@ -375,6 +397,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds a float to the constant pool.
*
* @param value Value
* @return Index
*/
@@ -386,6 +409,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds a float4 to the constant pool.
*
* @param value Value
* @return Index
*/
@@ -397,6 +421,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Adds a string to the constant pool.
*
* @param value Value
* @return Index
*/
@@ -408,6 +433,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Sets an integer at the specified index.
*
* @param index Index
* @param value Value
* @return Value
@@ -419,6 +445,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Sets a namespace at the specified index.
*
* @param index Index
* @param ns Namespace
* @return Namespace
@@ -430,6 +457,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Sets a namespace set at the specified index.
*
* @param index Index
* @param nss Namespace set
* @return Namespace set
@@ -441,6 +469,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Sets a multiname at the specified index.
*
* @param index Index
* @param m Multiname
* @return Multiname
@@ -452,6 +481,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Sets an unsigned integer at the specified index.
*
* @param index Index
* @param value Value
* @return Value
@@ -463,6 +493,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Sets a double at the specified index.
*
* @param index Index
* @param value Value
* @return Value
@@ -474,6 +505,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Sets a decimal at the specified index.
*
* @param index Index
* @param value Value
* @return Value
@@ -485,6 +517,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Sets a float at the specified index.
*
* @param index Index
* @param value Value
* @return Value
@@ -496,6 +529,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Sets a float4 at the specified index.
*
* @param index Index
* @param value Value
* @return Value
@@ -507,6 +541,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Sets a string at the specified index.
*
* @param index Index
* @param value Value
* @return Value
@@ -518,6 +553,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets an integer at the specified index.
*
* @param index Index
* @return Value
*/
@@ -530,6 +566,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets a namespace at the specified index.
*
* @param index Index
* @return Namespace
*/
@@ -539,6 +576,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets a namespace set at the specified index.
*
* @param index Index
* @return Namespace set
*/
@@ -572,6 +610,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets a multiname at the specified index.
*
* @param index Index
* @return Multiname
*/
@@ -581,6 +620,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets an unsigned integer at the specified index.
*
* @param index Index
* @return Value
*/
@@ -593,6 +633,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets a double at the specified index.
*
* @param index Index
* @return Value
*/
@@ -605,6 +646,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets a decimal at the specified index.
*
* @param index Index
* @return Value
*/
@@ -614,6 +656,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets a float at the specified index.
*
* @param index Index
* @return Value
*/
@@ -623,6 +666,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets a float4 at the specified index.
*
* @param index Index
* @return Value
*/
@@ -632,6 +676,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets a string at the specified index.
*
* @param index Index
* @return Value
*/
@@ -641,6 +686,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the number of integers in the constant pool.
*
* @return Count
*/
public int getIntCount() {
@@ -649,6 +695,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the number of namespaces in the constant pool.
*
* @return Count
*/
public int getNamespaceCount() {
@@ -657,6 +704,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the number of namespace sets in the constant pool.
*
* @return Count
*/
public int getNamespaceSetCount() {
@@ -665,6 +713,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the number of multinames in the constant pool.
*
* @return Count
*/
public int getMultinameCount() {
@@ -673,6 +722,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the number of unsigned integers in the constant pool.
*
* @return Count
*/
public int getUIntCount() {
@@ -681,6 +731,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the number of doubles in the constant pool.
*
* @return Count
*/
public int getDoubleCount() {
@@ -689,6 +740,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the number of decimals in the constant pool.
*
* @return Count
*/
public int getDecimalCount() {
@@ -697,6 +749,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the number of floats in the constant pool.
*
* @return Count
*/
public int getFloatCount() {
@@ -705,6 +758,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the number of float4s in the constant pool.
*
* @return Count
*/
public int getFloat4Count() {
@@ -713,6 +767,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the number of strings in the constant pool.
*
* @return Count
*/
public int getStringCount() {
@@ -720,9 +775,10 @@ public class AVM2ConstantPool implements Cloneable {
}
/**
* Gets sub index of namespace with the specified namespace id.
* The namespaces that have the same name and kind are considered to be the same,
* so they have assigned a sub index to distinguish them.
* Gets sub index of namespace with the specified namespace id. The
* namespaces that have the same name and kind are considered to be the
* same, so they have assigned a sub index to distinguish them.
*
* @param namespaceId Namespace id
* @return Sub index
*/
@@ -738,7 +794,9 @@ public class AVM2ConstantPool implements Cloneable {
}
/**
* Gets the namespace id of the namespace with the specified kind, name index and sub index.
* Gets the namespace id of the namespace with the specified kind, name
* index and sub index.
*
* @param kind Kind
* @param nameIndex Name index
* @param index Sub index
@@ -758,7 +816,9 @@ public class AVM2ConstantPool implements Cloneable {
}
/**
* Gets the namespace id of the namespace with the specified kind, name and sub index.
* Gets the namespace id of the namespace with the specified kind, name and
* sub index.
*
* @param kind Kind
* @param nameIndex Name index
* @param index Sub index
@@ -774,7 +834,9 @@ public class AVM2ConstantPool implements Cloneable {
}
/**
* Gets the namespace id of the namespace with the specified kind, name and sub index.
* Gets the namespace id of the namespace with the specified kind, name and
* sub index.
*
* @param kind Kind
* @param name Name
* @param index Sub index
@@ -791,7 +853,9 @@ public class AVM2ConstantPool implements Cloneable {
}
/**
* Gets the namespace id of the namespace with the specified kind, name and sub index.
* Gets the namespace id of the namespace with the specified kind, name and
* sub index.
*
* @param kind Kind
* @param name Name
* @param index Sub index
@@ -808,6 +872,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets decimal id.
*
* @param val Decimal
* @param add Whether to add the decimal if it does not exist
* @return Decimal id
@@ -822,6 +887,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets decimal id.
*
* @param value Value
* @return Decimal id
*/
@@ -831,6 +897,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets Qname id.
*
* @param name Name
* @param namespaceKind Namespace kind
* @param namespaceName Namespace name
@@ -843,6 +910,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets public Qname id.
*
* @param name Name
* @param add Whether to add the Qname if it does not exist
* @return Qname id
@@ -853,6 +921,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets Multiname id.
*
* @param value Multiname
* @return Multiname id
*/
@@ -862,6 +931,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets Multiname id.
*
* @param val Multiname
* @param add Whether to add the Multiname if it does not exist
* @return Multiname id
@@ -894,6 +964,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets string id.
*
* @param value Value
* @return String id
*/
@@ -903,6 +974,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets string id.
*
* @param val Value
* @param add Whether to add the string if it does not exist
* @return String id
@@ -920,6 +992,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets string id.
*
* @param val Value
* @param add Whether to add the string if it does not exist
* @return String id
@@ -934,6 +1007,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets integer id.
*
* @param value Value
* @return Integer id
*/
@@ -943,6 +1017,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets integer id.
*
* @param val Value
* @param add Whether to add the integer if it does not exist
* @return Integer id
@@ -957,6 +1032,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets namespace set id.
*
* @param namespaces Namespaces
* @return Namespace set id
*/
@@ -986,6 +1062,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets namespace set id.
*
* @param namespaces Namespaces
* @param add Whether to add the namespace set if it does not exist
* @return Namespace set id
@@ -1000,6 +1077,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets unsigned integer id.
*
* @param value Value
* @return Unsigned integer id
*/
@@ -1009,6 +1087,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets unsigned integer id.
*
* @param val Value
* @param add Whether to add the unsigned integer if it does not exist
* @return Unsigned integer id
@@ -1023,6 +1102,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets double id.
*
* @param value Value
* @return Double id
*/
@@ -1032,6 +1112,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets double id.
*
* @param val Value
* @param add Whether to add the double if it does not exist
* @return Double id
@@ -1046,6 +1127,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets float id.
*
* @param value Value
* @return Float id
*/
@@ -1055,6 +1137,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets float id.
*
* @param val Value
* @param add Whether to add the float if it does not exist
* @return Float id
@@ -1069,6 +1152,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets float4 id.
*
* @param value Value
* @return Float4 id
*/
@@ -1078,6 +1162,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets float4 id.
*
* @param val Value
* @param add Whether to add the float4 if it does not exist
* @return Float4 id
@@ -1092,6 +1177,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Gets the string at the specified index as dotted chain.
*
* @param index Index
* @return Dotted chain
*/
@@ -1108,6 +1194,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Dumps the constant pool.
*
* @param writer Writer
*/
public void dump(Utf8PrintWriter writer) {
@@ -1137,6 +1224,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Converts multiname to string.
*
* @param index Multiname index
* @return String
*/
@@ -1149,6 +1237,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Converts namespace to string.
*
* @param index Namespace index
* @return String
*/
@@ -1161,6 +1250,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Converts namespace set to string.
*
* @param index Namespace set index
* @return String
*/
@@ -1173,6 +1263,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Clones the constant pool.
*
* @return Cloned constant pool
*/
@Override
@@ -1199,6 +1290,7 @@ public class AVM2ConstantPool implements Cloneable {
/**
* Makes a push instruction for the specified value.
*
* @param ovalue Value
* @return Instruction
*/
@@ -1363,8 +1455,8 @@ public class AVM2ConstantPool implements Cloneable {
}
/**
* Checks cyclic type names.
* A type name is cyclic if it references itself or any of its children.
* Checks cyclic type names. A type name is cyclic if it references itself
* or any of its children.
*/
public void checkCyclicTypeNames() {
for (int i = 0; i < constant_multiname.size(); i++) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -30,6 +30,7 @@ import java.util.regex.Pattern;
/**
* AVM2 deobfuscation.
*
* @author JPEXS
*/
public class AVM2Deobfuscation {
@@ -81,6 +82,7 @@ public class AVM2Deobfuscation {
/**
* Constructs AVM2 deobfuscation.
*
* @param swf SWF
* @param constants AVM2 constant pool
*/
@@ -91,6 +93,7 @@ public class AVM2Deobfuscation {
/**
* Checks if string is valid namespace part.
*
* @param s String
* @return True if string is valid namespace part
*/
@@ -119,6 +122,7 @@ public class AVM2Deobfuscation {
/**
* Gets built-in namespace.
*
* @param ns Namespace
* @return Built-in namespace
*/
@@ -137,6 +141,7 @@ public class AVM2Deobfuscation {
/**
* Generates random string.
*
* @param deobfuscated Deobfuscated names
* @param orig Original name
* @param firstUppercase First uppercase
@@ -176,6 +181,7 @@ public class AVM2Deobfuscation {
/**
* Deobfuscates package name.
*
* @param stringUsageTypes String usage types
* @param stringUsages String usages
* @param namesMap Names map
@@ -223,6 +229,7 @@ public class AVM2Deobfuscation {
/**
* Deobfuscates name.
*
* @param stringUsageTypes String usage types
* @param stringUsages String usages
* @param namespaceUsages Namespace usages

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -26,6 +26,7 @@ import java.util.Set;
/**
* AVM2 final process local data.
*
* @author JPEXS
*/
public class AVM2FinalProcessLocalData extends FinalProcessLocalData {
@@ -42,9 +43,12 @@ public class AVM2FinalProcessLocalData extends FinalProcessLocalData {
/**
* Constructs AVM2 final process local data.
*
* @param loops List of loops
* @param localRegNames Local register names - register number to name mapping
* @param setLocalPosToGetLocalPos Set local position to get local position mapping
* @param localRegNames Local register names - register number to name
* mapping
* @param setLocalPosToGetLocalPos Set local position to get local position
* mapping
*/
public AVM2FinalProcessLocalData(List<Loop> loops, HashMap<Integer, String> localRegNames, Map<Integer, Set<Integer>> setLocalPosToGetLocalPos) {
super(loops);
@@ -54,6 +58,7 @@ public class AVM2FinalProcessLocalData extends FinalProcessLocalData {
/**
* Gets getlocal positions for setlocal position.
*
* @param setLocalPos Setlocal position
* @return Set of getlocal positions
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2;
/**
* Type of AVM2 runtime enum.
*
* @author JPEXS
*/
public enum AVM2Runtime {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2;
/**
* Info of AVM2 runtime.
*
* @author JPEXS
*/
public class AVM2RuntimeInfo {
@@ -39,6 +40,7 @@ public class AVM2RuntimeInfo {
/**
* Constructs AVM2 runtime info.
*
* @param runtime AVM2 runtime
* @param version AVM2 version
* @param debug Debug flag

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -26,6 +26,7 @@ import java.util.List;
/**
* Code statistics.
*
* @author JPEXS
*/
public class CodeStats {
@@ -67,6 +68,7 @@ public class CodeStats {
/**
* Converts statistics to string.
*
* @param writer Writer
* @param abc ABC
* @param fullyQualifiedNames Fully qualified names
@@ -95,6 +97,7 @@ public class CodeStats {
/**
* Constructs code statistics.
*
* @param code AVM2 code
*/
public CodeStats(AVM2Code code) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2;
/**
* Convert exception.
*
* @author JPEXS
*/
public class ConvertException extends RuntimeException {
@@ -27,9 +28,9 @@ public class ConvertException extends RuntimeException {
*/
public int line;
/**
* Constructs convert exception.
*
* @param s Message
* @param line Line number
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -22,6 +22,7 @@ import java.util.List;
/**
* Conversion output.
*
* @author JPEXS
*/
public class ConvertOutput {
@@ -38,6 +39,7 @@ public class ConvertOutput {
/**
* Constructs conversion output.
*
* @param stack Translate stack
* @param output Output
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -21,6 +21,7 @@ import com.jpexs.decompiler.graph.TranslateStack;
/**
* Translate stack that counts the number of items pushed and not popped.
*
* @author JPEXS
*/
public class FixItemCounterTranslateStack extends TranslateStack {
@@ -32,6 +33,7 @@ public class FixItemCounterTranslateStack extends TranslateStack {
/**
* Constructs a new FixItemCounterTranslateStack
*
* @param path Path
*/
public FixItemCounterTranslateStack(String path) {
@@ -40,6 +42,7 @@ public class FixItemCounterTranslateStack extends TranslateStack {
/**
* Pops an item from the stack
*
* @return The popped item
*/
@Override
@@ -54,6 +57,7 @@ public class FixItemCounterTranslateStack extends TranslateStack {
/**
* Removes the element at the specified index
*
* @param index the index of the element to be removed
* @return The removed element
*/
@@ -67,6 +71,7 @@ public class FixItemCounterTranslateStack extends TranslateStack {
/**
* All items were never popped.
*
* @return True if all items were never popped
*/
public boolean allItemsFixed() {
@@ -75,6 +80,7 @@ public class FixItemCounterTranslateStack extends TranslateStack {
/**
* Gets the number of items that were never popped
*
* @return The number of items that were never popped
*/
public int getFixItemCount() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,6 +20,7 @@ import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
/**
* Instruction statistics.
*
* @author JPEXS
*/
public class InstructionStats {
@@ -56,6 +57,7 @@ public class InstructionStats {
/**
* Constructs a new InstructionStats object
*
* @param ins Instruction
*/
public InstructionStats(AVM2Instruction ins) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2;
/**
* Invalid instruction arguments exception.
*
* @author JPEXS
*/
public class InvalidInstructionArgumentsException extends RuntimeException {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -21,6 +21,7 @@ import java.util.Stack;
/**
* Local data area for AVM2 method execution.
*
* @author JPEXS
*/
public class LocalDataArea {
@@ -73,6 +74,7 @@ public class LocalDataArea {
/**
* Gets domain memory.
*
* @return Domain memory bytes.
*/
public byte[] getDomainMemory() {
@@ -85,6 +87,7 @@ public class LocalDataArea {
/**
* Gets runtime.
*
* @return Runtime.
*/
public AVM2Runtime getRuntime() {
@@ -93,6 +96,7 @@ public class LocalDataArea {
/**
* Gets debug flag.
*
* @return True if debug flag is set.
*/
public boolean isDebug() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -76,6 +76,7 @@ public class NumberContext {
/**
* Sets the usage of the number.
*
* @param usage
*/
public void setUsage(int usage) {
@@ -87,6 +88,7 @@ public class NumberContext {
/**
* Gets the usage of the number.
*
* @return Usage of the number.
*/
public int getUsage() {
@@ -95,6 +97,7 @@ public class NumberContext {
/**
* Gets the precision of the number.
*
* @return Precision of the number.
*/
public int getPrecision() {
@@ -103,6 +106,7 @@ public class NumberContext {
/**
* Sets the precision of the number.
*
* @param precision Precision of the number.
*/
public void setPrecision(int precision) {
@@ -114,6 +118,7 @@ public class NumberContext {
/**
* Converts the number context to a parameter.
*
* @return Parameter.
*/
public int toParam() {

View File

@@ -1,30 +1,32 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
package com.jpexs.decompiler.flash.abc.avm2;
/**
* Offset updater interface.
* Used to update offsets in instructions and operands.
* Offset updater interface. Used to update offsets in instructions and
* operands.
*
* @author JPEXS
*/
public interface OffsetUpdater {
/**
* Updates instruction offset.
*
* @param addr Address of the instruction
* @return New address of the instruction
*/
@@ -32,6 +34,7 @@ public interface OffsetUpdater {
/**
* Updates operand offset.
*
* @param jumpAddr Address of the jump instruction
* @param targetAddress Address of the target instruction
* @param offset Operand (offset) of the jump instruction

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2;
/**
* Exception thrown when unknown instruction code is found.
*
* @author JPEXS
*/
public class UnknownInstructionCodeException extends RuntimeException {
@@ -29,6 +30,7 @@ public class UnknownInstructionCodeException extends RuntimeException {
/**
* Constructs a new UnknownInstructionCodeException.
*
* @param code Instruction code
*/
public UnknownInstructionCodeException(int code) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -47,9 +47,8 @@ import java.util.List;
import java.util.Map;
/**
*
* AVM2 Deobfuscator removing single get / set registers.
*
* <p>
* Example: getlocal_1, getlocal_2, (kill 1), (kill 2), setlocal_2, setlocal_1
*
* @author JPEXS
@@ -73,6 +72,7 @@ public class AVM2DeobfuscatorGetSet extends SWFDecompilerAdapter {
/**
* Remove obfuscation get sets
*
* @param classIndex Class index
* @param isStatic Is static
* @param scriptIndex Script index
@@ -121,6 +121,7 @@ public class AVM2DeobfuscatorGetSet extends SWFDecompilerAdapter {
/**
* Remove unreachable instructions.
*
* @param code AVM2 code
* @param body Method body
* @throws InterruptedException
@@ -131,6 +132,7 @@ public class AVM2DeobfuscatorGetSet extends SWFDecompilerAdapter {
/**
* Create new local data.
*
* @param scriptIndex Script index
* @param abc ABC
* @param cpool Constant pool
@@ -162,6 +164,7 @@ public class AVM2DeobfuscatorGetSet extends SWFDecompilerAdapter {
/**
* Initialize local registers.
*
* @param localData AVM2 local data
* @param localReservedCount Local reserved count
* @param maxRegs Maximum registers
@@ -177,6 +180,7 @@ public class AVM2DeobfuscatorGetSet extends SWFDecompilerAdapter {
/**
* Execute instructions.
*
* @param body Method body
* @param code AVM2 code
* @param localData AVM2 local data
@@ -270,6 +274,7 @@ public class AVM2DeobfuscatorGetSet extends SWFDecompilerAdapter {
/**
* AVM2 code remove traps.
*
* @param path Path
* @param classIndex Class index
* @param isStatic Is static

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -101,9 +101,9 @@ A: jump B
C: blk_4
*/
/**
* Removes dead code and merges jump parts.
*
* @param path Path
* @param classIndex Class index
* @param isStatic Is static
@@ -180,6 +180,7 @@ C: blk_4
/**
* Gets real refs.
*
* @param refs Refs
* @param ip IP
* @return Real refs

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -30,16 +30,15 @@ import java.util.List;
import java.util.Map;
/**
*
* AVM2 Deobfuscator replacing jumps/ifs targeting other jumps.
*
*
* @author JPEXS
*/
public class AVM2DeobfuscatorJumps extends SWFDecompilerAdapter {
/**
* Removes jumps/ifs targeting other jumps.
*
* @param path Path
* @param classIndex Class index
* @param isStatic Is static

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -55,9 +55,8 @@ import java.util.logging.Level;
import java.util.logging.Logger;
/**
*
* AVM2 Deobfuscator removing single assigned local registers.
*
* <p>
* Example: var a = true; var b = false; ... if(a){ ...ok }else{ not executed }
*
* @author JPEXS
@@ -66,6 +65,7 @@ public class AVM2DeobfuscatorRegisters extends AVM2DeobfuscatorSimple {
/**
* Gets registers used in the code.
*
* @param code AVM2 code
* @return Set of registers
*/
@@ -95,6 +95,7 @@ public class AVM2DeobfuscatorRegisters extends AVM2DeobfuscatorSimple {
/**
* Removes single assigned local registers.
*
* @param path Path
* @param classIndex Class index
* @param isStatic Is static
@@ -174,6 +175,7 @@ public class AVM2DeobfuscatorRegisters extends AVM2DeobfuscatorSimple {
/**
* Replaces single use registers.
*
* @param singleRegisters Single registers
* @param setInss Set instructions
* @param classIndex Class index
@@ -215,6 +217,7 @@ public class AVM2DeobfuscatorRegisters extends AVM2DeobfuscatorSimple {
/**
* Gets first register id which has setter.
*
* @param assignment Assignment
* @param body Method body
* @param abc ABC
@@ -235,6 +238,7 @@ public class AVM2DeobfuscatorRegisters extends AVM2DeobfuscatorSimple {
/**
* Visits code.
*
* @param assignment Assignment
* @param visited Visited
* @param stack Stack

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -52,9 +52,8 @@ import java.util.Map;
import java.util.Set;
/**
*
* AVM2 Deobfuscator removing single assigned local registers.
*
* <p>
* Example: var a = true; var b = false; ... if(a){ ...ok }else{ not executed }
*
* @author JPEXS
@@ -63,6 +62,7 @@ public class AVM2DeobfuscatorRegistersOld extends AVM2DeobfuscatorSimpleOld {
/**
* Gets all register ids.
*
* @param code AVM2 code
* @return Set of register ids
*/
@@ -92,6 +92,7 @@ public class AVM2DeobfuscatorRegistersOld extends AVM2DeobfuscatorSimpleOld {
/**
* Removes single assigned local registers.
*
* @param path Path
* @param classIndex Class index
* @param isStatic Is static
@@ -171,6 +172,7 @@ public class AVM2DeobfuscatorRegistersOld extends AVM2DeobfuscatorSimpleOld {
/**
* Gets first register with setter.
*
* @param assignment Assignment
* @param classIndex Class index
* @param isStatic Is static
@@ -209,6 +211,7 @@ public class AVM2DeobfuscatorRegistersOld extends AVM2DeobfuscatorSimpleOld {
/**
* Constructs a new instance of ExceptionTargetIpPair.
*
* @param exception Exception
* @param targetIp Target ip
*/
@@ -219,6 +222,7 @@ public class AVM2DeobfuscatorRegistersOld extends AVM2DeobfuscatorSimpleOld {
/**
* Gets exception.
*
* @return Exception
*/
public ABCException getException() {
@@ -227,6 +231,7 @@ public class AVM2DeobfuscatorRegistersOld extends AVM2DeobfuscatorSimpleOld {
/**
* Gets target ip.
*
* @return Target ip
*/
public int getTargetIp() {
@@ -237,6 +242,7 @@ public class AVM2DeobfuscatorRegistersOld extends AVM2DeobfuscatorSimpleOld {
/**
* Visits code.
*
* @param assignment Assignment
* @param visited Visited
* @param stack Stack

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -85,6 +85,7 @@ import java.util.Stack;
/**
* Simple AVM2 deobfuscator.
*
* @author JPEXS
*/
public class AVM2DeobfuscatorSimple extends AVM2DeobfuscatorZeroJumpsNullPushes {
@@ -96,6 +97,7 @@ public class AVM2DeobfuscatorSimple extends AVM2DeobfuscatorZeroJumpsNullPushes
/**
* Removes obfuscation ifs.
*
* @param classIndex Class index
* @param isStatic Is static
* @param scriptIndex Script index
@@ -144,6 +146,7 @@ public class AVM2DeobfuscatorSimple extends AVM2DeobfuscatorZeroJumpsNullPushes
/**
* Initializes local registers.
*
* @param localData Local data
* @param localReservedCount Count of reserved local registers
* @param maxRegs Maximum registers
@@ -160,6 +163,7 @@ public class AVM2DeobfuscatorSimple extends AVM2DeobfuscatorZeroJumpsNullPushes
/**
* Executes instructions.
*
* @param staticRegs Static registers
* @param body Method body
* @param abc ABC
@@ -385,6 +389,7 @@ public class AVM2DeobfuscatorSimple extends AVM2DeobfuscatorZeroJumpsNullPushes
/**
* Simple deobfuscation.
*
* @param path Path
* @param classIndex Class index
* @param isStatic Is static

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -110,6 +110,7 @@ import java.util.Stack;
/**
* Simple deobfuscator for AVM2 code. (Old version)
*
* @author JPEXS
*/
public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPushes {
@@ -131,6 +132,7 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush
/**
* Creates a push instruction from a graph target item.
*
* @param cpool Constant pool
* @param graphTargetItem Graph target item
* @return Push instruction
@@ -160,6 +162,7 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush
/**
* Removes obfuscation ifs.
*
* @param classIndex Class index
* @param isStatic Is static
* @param scriptIndex Script index
@@ -224,6 +227,7 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush
/**
* Creates a new local data.
*
* @param scriptIndex Script index
* @param abc ABC
* @param cpool Constant pool
@@ -255,6 +259,7 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush
/**
* Initializes local registers.
*
* @param localData Local data
* @param localReservedCount Count of reserved local registers
* @param maxRegs Maximal register id
@@ -270,6 +275,7 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush
/**
* Executes instructions.
*
* @param importantOffsets Important offsets
* @param staticRegs Static registers
* @param body Method body
@@ -596,6 +602,7 @@ public class AVM2DeobfuscatorSimpleOld extends AVM2DeobfuscatorZeroJumpsNullPush
/**
* Simple deobfuscates AVM2 code.
*
* @param path Path
* @param classIndex Class index
* @param isStatic Is static

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -42,12 +42,14 @@ import java.util.Set;
/**
* Deobfuscator for removing zero jumps and null pushes.
*
* @author JPEXS
*/
public class AVM2DeobfuscatorZeroJumpsNullPushes extends SWFDecompilerAdapter {
/**
* Removes zero jumps from the code.
*
* @param code AVM2 code
* @param body Method body
* @return True if any zero jumps were removed
@@ -59,9 +61,11 @@ public class AVM2DeobfuscatorZeroJumpsNullPushes extends SWFDecompilerAdapter {
/**
* Removes zero jumps from the code.
*
* @param code AVM2 code
* @param body Method body
* @param minChangedIpRef Reference to the minimum changed instruction pointer
* @param minChangedIpRef Reference to the minimum changed instruction
* pointer
* @return True if any zero jumps were removed
* @throws InterruptedException
*/
@@ -91,6 +95,7 @@ public class AVM2DeobfuscatorZeroJumpsNullPushes extends SWFDecompilerAdapter {
/**
* Checks if the instruction is a simple push.
*
* @param def Instruction definition
* @return True if the instruction is a simple push
*/
@@ -110,6 +115,7 @@ public class AVM2DeobfuscatorZeroJumpsNullPushes extends SWFDecompilerAdapter {
/**
* Removes null pushes from the code.
*
* @param code AVM2 code
* @param body Method body
* @return True if any null pushes were removed
@@ -165,6 +171,7 @@ public class AVM2DeobfuscatorZeroJumpsNullPushes extends SWFDecompilerAdapter {
/**
* Removes zero jumps and null pushes from the code.
*
* @param path Path
* @param classIndex Class index
* @param isStatic Is static

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
/**
* Level of deobfuscation enum.
*
* @author JPEXS
*/
public enum DeobfuscationLevel {
@@ -32,6 +33,7 @@ public enum DeobfuscationLevel {
/**
* Get level of deobfuscation as number
*
* @return
*/
public int getLevel() {
@@ -40,6 +42,7 @@ public enum DeobfuscationLevel {
/**
* Get deobfuscation level by level number.
*
* @param level Level number
* @return Deobfuscation level or null if not found
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
/**
* Deobfuscation scope enum.
*
* @author JPEXS
*/
public enum DeobfuscationScope {

View File

@@ -1,4 +1,4 @@
/**
* Deobfuscating AVM2 bytecode.
*/
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;
package com.jpexs.decompiler.flash.abc.avm2.deobfuscation;

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,12 +18,14 @@ package com.jpexs.decompiler.flash.abc.avm2.exceptions;
/**
* Exception thrown when an error occurs during AVM2 execution.
*
* @author JPEXS
*/
public class AVM2ExecutionException extends Exception {
/**
* Constructs new AVM2ExecutionException with the specified detail message.
*
* @param message
*/
public AVM2ExecutionException(String message) {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,23 +18,29 @@ package com.jpexs.decompiler.flash.abc.avm2.exceptions;
/**
* Range error exception.
*
* @author JPEXS
*/
public class AVM2RangeErrorException extends AVM2ExecutionException {
/**
* Constructs new AVM2RangeErrorException with the specified error code.
*
* @param code Error code
* @param debug If true, the error message will contain a description of the error
* @param debug If true, the error message will contain a description of the
* error
*/
public AVM2RangeErrorException(int code, boolean debug) {
super(codeToMessage(code, debug, null));
}
/**
* Constructs new AVM2RangeErrorException with the specified error code and parameters.
* Constructs new AVM2RangeErrorException with the specified error code and
* parameters.
*
* @param code Error code
* @param debug If true, the error message will contain a description of the error
* @param debug If true, the error message will contain a description of the
* error
* @param params Parameters for the error message
*/
public AVM2RangeErrorException(int code, boolean debug, Object[] params) {
@@ -43,8 +49,10 @@ public class AVM2RangeErrorException extends AVM2ExecutionException {
/**
* Converts error code to error message.
*
* @param code Error code
* @param debug If true, the error message will contain a description of the error
* @param debug If true, the error message will contain a description of the
* error
* @param params Parameters for the error message
* @return Error message
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,23 +18,29 @@ package com.jpexs.decompiler.flash.abc.avm2.exceptions;
/**
* AVM2 TypeError exception.
*
* @author JPEXS
*/
public class AVM2TypeErrorException extends AVM2ExecutionException {
/**
* Constructs new AVM2TypeErrorException with the specified error code.
*
* @param code Error code
* @param debug If true, the error message will contain a description of the error
* @param debug If true, the error message will contain a description of the
* error
*/
public AVM2TypeErrorException(int code, boolean debug) {
super(codeToMessage(code, debug, null));
}
/**
* Constructs new AVM2TypeErrorException with the specified error code and parameters.
* Constructs new AVM2TypeErrorException with the specified error code and
* parameters.
*
* @param code Error code
* @param debug If true, the error message will contain a description of the error
* @param debug If true, the error message will contain a description of the
* error
* @param params Parameters for the error message
*/
public AVM2TypeErrorException(int code, boolean debug, Object[] params) {
@@ -43,8 +49,10 @@ public class AVM2TypeErrorException extends AVM2ExecutionException {
/**
* Converts error code to error message.
*
* @param code Error code
* @param debug If true, the error message will contain a description of the error
* @param debug If true, the error message will contain a description of the
* error
* @param params Parameters for the error message
* @return Error message
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.exceptions;
/**
* AVM2 VerifyError exception.
*
* @author JPEXS
*/
public class AVM2VerifyErrorException extends AVM2ExecutionException {
@@ -39,17 +40,22 @@ public class AVM2VerifyErrorException extends AVM2ExecutionException {
/**
* Constructs new AVM2VerifyErrorException with the specified error code.
*
* @param code Error code
* @param debug If true, the error message will contain a description of the error
* @param debug If true, the error message will contain a description of the
* error
*/
public AVM2VerifyErrorException(int code, boolean debug) {
super(codeToMessage(code, debug, null));
}
/**
* Constructs new AVM2VerifyErrorException with the specified error code and parameters.
* Constructs new AVM2VerifyErrorException with the specified error code and
* parameters.
*
* @param code Error code
* @param debug If true, the error message will contain a description of the error
* @param debug If true, the error message will contain a description of the
* error
* @param params Parameters for the error message
*/
public AVM2VerifyErrorException(int code, boolean debug, Object[] params) {
@@ -58,8 +64,10 @@ public class AVM2VerifyErrorException extends AVM2ExecutionException {
/**
* Converts error code to error message.
*
* @param code Error code
* @param debug If true, the error message will contain a description of the error
* @param debug If true, the error message will contain a description of the
* error
* @param params Parameters for the error message
* @return Error message
*/

View File

@@ -1,4 +1,4 @@
/**
* Exceptions for AVM2 execution.
*/
package com.jpexs.decompiler.flash.abc.avm2.exceptions;
package com.jpexs.decompiler.flash.abc.avm2.exceptions;

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -23,6 +23,7 @@ import java.util.Set;
/**
* Instruction item for fast AVM2 list.
*
* @author JPEXS
*/
public class AVM2InstructionItem {
@@ -64,8 +65,8 @@ public class AVM2InstructionItem {
//
/**
* Whether this instruction is reachable.
* 1 means reachable, 2 means reachable and processed.
* Whether this instruction is reachable. 1 means reachable, 2 means
* reachable and processed.
*/
int reachable;
@@ -76,6 +77,7 @@ public class AVM2InstructionItem {
/**
* Constructs a new AVM2InstructionItem
*
* @param ins Instruction
*/
public AVM2InstructionItem(AVM2Instruction ins) {
@@ -84,6 +86,7 @@ public class AVM2InstructionItem {
/**
* Checks whether this instruction is a jump target.
*
* @return Whether this instruction is a jump target
*/
public boolean isJumpTarget() {
@@ -92,6 +95,7 @@ public class AVM2InstructionItem {
/**
* Gets the number of jumps to this instruction.
*
* @return Number of jumps to this instruction
*/
public int jumpsHereSize() {
@@ -100,6 +104,7 @@ public class AVM2InstructionItem {
/**
* Checks whether this instruction is the last instruction of a container.
*
* @return Whether this instruction is the last instruction of a container
*/
public boolean isContainerLastInstruction() {
@@ -123,6 +128,7 @@ public class AVM2InstructionItem {
/**
* Get jump target.
*
* @return Instruction item
*/
public AVM2InstructionItem getJumpTarget() {
@@ -131,6 +137,7 @@ public class AVM2InstructionItem {
/**
* Get jump target instruction.
*
* @return Instruction
*/
public AVM2Instruction getJumpTargetInstruction() {
@@ -139,6 +146,7 @@ public class AVM2InstructionItem {
/**
* Set jump target.
*
* @param item Instruction item
*/
public void setJumpTarget(AVM2InstructionItem item) {
@@ -158,6 +166,7 @@ public class AVM2InstructionItem {
/**
* Get last instructions of container.
*
* @return List of instruction items
*/
public List<AVM2InstructionItem> getContainerLastInstructions() {
@@ -183,6 +192,7 @@ public class AVM2InstructionItem {
/**
* Replace container last instruction.
*
* @param oldItem Old instruction item
* @param newItem New instruction item
*/
@@ -205,6 +215,7 @@ public class AVM2InstructionItem {
/**
* Set container last instructions.
*
* @param lastInstructions
*/
public void setContainerLastInstructions(List<AVM2InstructionItem> lastInstructions) {
@@ -219,6 +230,7 @@ public class AVM2InstructionItem {
/**
* Ensure last instruction is non-null.
*
* @return Set of instruction items
*/
private Set<AVM2InstructionItem> ensureLastInstructionOf() {
@@ -231,6 +243,7 @@ public class AVM2InstructionItem {
/**
* Checks whether this instruction is excluded.
*
* @return Whether this instruction is excluded
*/
public boolean isExcluded() {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -34,6 +34,7 @@ import java.util.Set;
/**
* Fast AVM2 instruction list.
*
* @author JPEXS
*/
public class FastAVM2List implements Collection<AVM2InstructionItem> {
@@ -60,6 +61,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Constructs a new FastAVM2List from a method body
*
* @param body Method body
*/
public FastAVM2List(MethodBody body) {
@@ -78,6 +80,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Inserts item before another item
*
* @param item Item to insert before
* @param action Action to insert
* @return
@@ -89,6 +92,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Inserts item before another item
*
* @param item Item to insert before
* @param newItem New item
* @return New item
@@ -104,6 +108,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Inserts item after another item
*
* @param item Item to insert after
* @param action Action to insert
* @return
@@ -115,6 +120,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Inserts item after another item
*
* @param item Item to insert after
* @param newItem New item
* @return New item
@@ -145,6 +151,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Removes item
*
* @param item Item to remove
* @return Next item
*/
@@ -190,6 +197,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Removes item.
*
* @param index Index of item to remove
* @param count Number of items to remove
*/
@@ -203,6 +211,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Gets item at index
*
* @param index Index
* @return Item
*/
@@ -213,6 +222,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Replace jump targets.
*
* @param target Target
* @param newTarget New target
*/
@@ -226,6 +236,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Gets nerby address.
*
* @param instructions Instructions
* @param address Address
* @param next Next
@@ -254,6 +265,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Gets jumps.
*
* @param actions Actions
* @param actionItemMap Action item map
*/
@@ -327,7 +339,6 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
} while (item != firstItem);
}
/**
* Updates container sizes.
*/
@@ -357,6 +368,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Gets container.
*
* @param item Item
* @return Container
*/
@@ -436,6 +448,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Gets unreachable action count.
*
* @param jump Jump
* @param jumpTarget Jump target
* @return
@@ -478,6 +491,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Sets excluded flags.
*
* @param value Value
*/
public void setExcludedFlags(boolean value) {
@@ -494,6 +508,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Updates reachable flags.
*
* @param jump Jump
* @param jumpTarget Jump target
*/
@@ -562,6 +577,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Updates actions.
*
* @param body Method body
*/
public void updateActions(MethodBody body) {
@@ -586,6 +602,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Gets first item.
*
* @return First item
*/
public AVM2InstructionItem first() {
@@ -594,6 +611,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Gets last item.
*
* @return Last item
*/
public AVM2InstructionItem last() {
@@ -602,6 +620,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Converts to method body.
*
* @param body Method body
*/
public void toMethodBody(MethodBody body) {
@@ -610,6 +629,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Gets size.
*
* @return Size
*/
@Override
@@ -619,6 +639,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Checks if empty.
*
* @return Whether empty
*/
@Override
@@ -628,6 +649,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Checks if contains.
*
* @param o element whose presence in this collection is to be tested
* @return Whether contains
*/
@@ -644,6 +666,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Gets iterator.
*
* @return Iterator
*/
@Override
@@ -653,6 +676,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Converts to array.
*
* @return Array
*/
@Override
@@ -675,11 +699,12 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Converts to array.
*
* @param a the array into which the elements of this collection are to be
* stored, if it is big enough; otherwise, a new array of the same
* runtime type is allocated for this purpose.
* @return Array
* stored, if it is big enough; otherwise, a new array of the same runtime
* type is allocated for this purpose.
* @param <T>
* @return Array
*/
@Override
@SuppressWarnings("unchecked")
@@ -704,6 +729,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Adds an element to this collection.
*
* @param e element whose presence in this collection is to be ensured
* @return Whether added
*/
@@ -715,6 +741,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Removes a single instance of the specified element from this collection,
*
* @param o element to be removed from this collection, if present
* @return Whether removed
*/
@@ -736,7 +763,9 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
}
/**
* Checks whether this collection contains all of the elements in the specified collection.
* Checks whether this collection contains all of the elements in the
* specified collection.
*
* @param c collection to be checked for containment in this collection
* @return Whether contains all
*/
@@ -753,6 +782,7 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
/**
* Adds all of the elements in the specified collection to this collection.
*
* @param c collection containing elements to be added to this collection
* @return Whether added all
*/
@@ -766,8 +796,11 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
}
/**
* Removes all of this collection's elements that are also contained in the specified collection.
* @param c collection containing elements to be removed from this collection
* Removes all of this collection's elements that are also contained in the
* specified collection.
*
* @param c collection containing elements to be removed from this
* collection
* @return Whether removed all
*/
@Override
@@ -781,7 +814,9 @@ public class FastAVM2List implements Collection<AVM2InstructionItem> {
}
/**
* Retains only the elements in this collection that are contained in the specified collection.
* Retains only the elements in this collection that are contained in the
* specified collection.
*
* @param c collection containing elements to be retained in this collection
* @return Whether retained all
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -21,6 +21,7 @@ import java.util.Iterator;
/**
* Iterator for FastAVM2List
*
* @author JPEXS
*/
public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem> {
@@ -42,6 +43,7 @@ public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem>
/**
* Constructs a new iterator.
*
* @param list List
*/
FastAVM2ListIterator(FastAVM2List list) {
@@ -51,6 +53,7 @@ public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem>
/**
* Constructs a new iterator.
*
* @param list List
* @param index Index
*/
@@ -68,6 +71,7 @@ public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem>
/**
* Checks if there is a next item.
*
* @return True if there is a next item
*/
@Override
@@ -77,6 +81,7 @@ public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem>
/**
* Gets the next item.
*
* @return Next item
*/
@Override
@@ -93,6 +98,7 @@ public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem>
/**
* Gets the previous item.
*
* @return Previous item
*/
public AVM2InstructionItem prev() {
@@ -108,7 +114,8 @@ public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem>
}
/**
* Sets the current item.
* Sets the current item.
*
* @param item Item
*/
public void setCurrent(AVM2InstructionItem item) {
@@ -128,6 +135,7 @@ public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem>
/**
* Adds an item.
*
* @param ins Instruction
*/
public void add(AVM2Instruction ins) {
@@ -136,6 +144,7 @@ public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem>
/**
* Adds an item.
*
* @param insItem Instruction item
*/
public void add(AVM2InstructionItem insItem) {
@@ -144,6 +153,7 @@ public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem>
/**
* Adds an item before the current item.
*
* @param insItem Instruction item
*/
public void addBefore(AVM2InstructionItem insItem) {
@@ -152,6 +162,7 @@ public final class FastAVM2ListIterator implements Iterator<AVM2InstructionItem>
/**
* Get the item at the specified index.
*
* @param index Index
* @return Item
*/

View File

@@ -1,4 +1,4 @@
/**
* Fast AVM2 instruction list implementation.
*/
package com.jpexs.decompiler.flash.abc.avm2.fastavm2;
package com.jpexs.decompiler.flash.abc.avm2.fastavm2;

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -129,6 +129,7 @@ import java.util.logging.Logger;
/**
* AVM2 graph.
*
* @author JPEXS
*/
public class AVM2Graph extends Graph {
@@ -166,6 +167,7 @@ public class AVM2Graph extends Graph {
/**
* Get AVM2 code
*
* @return AVM2 code
*/
public AVM2Code getCode() {
@@ -174,6 +176,7 @@ public class AVM2Graph extends Graph {
/**
* Get exceptions
*
* @param body Method body
* @return Exceptions
*/
@@ -188,6 +191,7 @@ public class AVM2Graph extends Graph {
/**
* Constructs AVM2 graph
*
* @param abcIndex ABC indexing
* @param code AVM2 code
* @param abc ABC
@@ -212,6 +216,7 @@ public class AVM2Graph extends Graph {
/**
* Checks whether part can be break candidate
*
* @param localData Local data
* @param part Part
* @param throwStates List of throw states
@@ -229,6 +234,7 @@ public class AVM2Graph extends Graph {
/**
* Check before get loops
*
* @param localData Local data
* @param path Path
* @param allParts All parts
@@ -266,6 +272,7 @@ public class AVM2Graph extends Graph {
/**
* Check after get loops
*
* @param localData Local data
* @param path Path
* @param allParts All parts
@@ -278,6 +285,7 @@ public class AVM2Graph extends Graph {
/**
* Gets ignored switches
*
* @param localData Local data
* @param allParts All parts
* @throws InterruptedException
@@ -552,6 +560,7 @@ public class AVM2Graph extends Graph {
/**
* Walk local registers usage
*
* @param throwStates List of throw states
* @param localData Local data
* @param getLocalPos Get local position
@@ -653,8 +662,9 @@ public class AVM2Graph extends Graph {
/**
* Calculates local registers usage.
*
* <p>
* TODO: optimize this to make it faster!!!
*
* @param throwStates List of throw states
* @param localData Local data
* @param ignoredSwitches Ignored switches
@@ -706,6 +716,7 @@ public class AVM2Graph extends Graph {
/**
* Translates via Graph - decompiles.
*
* @param secondPassData Second pass data
* @param callStack Call stack
* @param abcIndex ABC indexing
@@ -759,6 +770,7 @@ public class AVM2Graph extends Graph {
/**
* Check graph.
*
* @param allBlocks All blocks
*/
@Override
@@ -780,6 +792,7 @@ public class AVM2Graph extends Graph {
/**
* Finds lookup switch with get local.
*
* @param registerId Register ID
* @param part Part
* @param visited Visited
@@ -813,6 +826,7 @@ public class AVM2Graph extends Graph {
/**
* Finds lookup switch with get local.
*
* @param registerId Register ID
* @param part Part
* @return Graph part
@@ -823,6 +837,7 @@ public class AVM2Graph extends Graph {
/**
* Finds all pops.
*
* @param localData Local data
* @param stackLevel Stack level
* @param part Part
@@ -850,8 +865,8 @@ public class AVM2Graph extends Graph {
}
/**
* Gets real references.
* Real = start >= 0
* Gets real references. Real = start >= 0
*
* @param part
* @return
*/
@@ -867,6 +882,7 @@ public class AVM2Graph extends Graph {
/**
* Search first part outside try-catch.
*
* @param localData Local data
* @param ex Exception
* @param loops Loops
@@ -902,6 +918,7 @@ public class AVM2Graph extends Graph {
/**
* Gets nearest non-empty part.
*
* @param part Part
* @return Graph part
*/
@@ -914,6 +931,7 @@ public class AVM2Graph extends Graph {
/**
* Gets catched exception IDs.
*
* @param part Part
* @param previouslyCatchedExceptionIds Previously catched exception IDs
* @param catchedExceptionIds Catched exception IDs
@@ -1032,6 +1050,7 @@ public class AVM2Graph extends Graph {
/**
* Finds nearest part outside catch.
*
* @param tryTarget Try target
* @param catchParts Catch parts
* @return Graph part
@@ -1049,6 +1068,7 @@ public class AVM2Graph extends Graph {
/**
* Checks try.
*
* @param currentRet Current return
* @param foundGotos Found gotos
* @param partCodes Part codes
@@ -1537,6 +1557,7 @@ public class AVM2Graph extends Graph {
/**
* Checks whether the part can handle visited.
*
* @param localData Local data
* @param part Graph part
* @return True if the part can handle visited
@@ -1558,6 +1579,7 @@ public class AVM2Graph extends Graph {
/**
* Checks whether the part can handle loop.
*
* @param localData Local data
* @param part Graph part
* @param loops List of loops
@@ -1604,6 +1626,7 @@ public class AVM2Graph extends Graph {
/**
* Check part output.
*
* @param currentRet Current return
* @param foundGotos Found gotos
* @param partCodes Part codes
@@ -1642,8 +1665,9 @@ public class AVM2Graph extends Graph {
}
/**
* Check before decompiling next section.
* Override this method to provide custom behavior.
* Check before decompiling next section. Override this method to provide
* custom behavior.
*
* @param currentRet Current return
* @param foundGotos Found gotos
* @param partCodes Part codes
@@ -1663,7 +1687,8 @@ public class AVM2Graph extends Graph {
* @param currentLoop Current loop
* @param staticOperation Unused
* @param path Path
* @return List of GraphTargetItems to replace current output and stop further processing. Null to continue.
* @return List of GraphTargetItems to replace current output and stop
* further processing. Null to continue.
* @throws InterruptedException
*/
@Override
@@ -1793,8 +1818,8 @@ public class AVM2Graph extends Graph {
}
/**
* Get next parts of a part.
* Can be overriden to provide custom behavior.
* Get next parts of a part. Can be overriden to provide custom behavior.
*
* @param localData Local data
* @param part Part
* @return List of GraphParts
@@ -1819,7 +1844,8 @@ public class AVM2Graph extends Graph {
* @param prev Previous part
* @param part Part
* @param allParts All parts
* @return Return same part to continue processing or return another part to continue to other part. Or return null to stop.
* @return Return same part to continue processing or return another part to
* continue to other part. Or return null to stop.
*/
@Override
protected GraphPart checkPartWithOutput(List<GraphTargetItem> output, TranslateStack stack,
@@ -1896,15 +1922,16 @@ public class AVM2Graph extends Graph {
return part;
}
/**
* Check of part.
*
* @param stack Translate stack
* @param localData Local data
* @param prev Previous part
* @param part Part
* @param allParts All parts
* @return Return same part to continue processing or return another part to continue to other part. Or return null to stop.
* @return Return same part to continue processing or return another part to
* continue to other part. Or return null to stop.
*/
@Override
protected GraphPart checkPart(TranslateStack stack, BaseLocalData localData, GraphPart prev, GraphPart part, Set<GraphPart> allParts) {
@@ -1913,6 +1940,7 @@ public class AVM2Graph extends Graph {
/**
* Checks whether part is empty.
*
* @param part Part
* @return True if part is empty
*/
@@ -1935,6 +1963,7 @@ public class AVM2Graph extends Graph {
/**
* Check loop.
*
* @param output List of GraphTargetItems
* @param loopItem Loop item
* @param localData Local data
@@ -2277,6 +2306,7 @@ public class AVM2Graph extends Graph {
/**
* Process various items.
*
* @param list List of GraphTargetItems
* @param lastLoopId Last loop id
*/
@@ -2332,6 +2362,7 @@ public class AVM2Graph extends Graph {
/**
* Final process after.
*
* @param list List of GraphTargetItems
* @param level Level
* @param localData Local data
@@ -2369,6 +2400,7 @@ public class AVM2Graph extends Graph {
/**
* Check if item is integer or pop integer.
*
* @param item GraphTargetItem
* @return True if item is integer or pop integer
*/
@@ -2384,6 +2416,7 @@ public class AVM2Graph extends Graph {
/**
* Final process.
*
* @param list List of GraphTargetItems
* @param level Level
* @param localData Local data
@@ -2744,6 +2777,7 @@ public class AVM2Graph extends Graph {
/**
* Gets data for final process.
*
* @param localData
* @param loops
* @param throwStates
@@ -2758,6 +2792,7 @@ public class AVM2Graph extends Graph {
/**
* Prepares local data for branch.
*
* @param localData Local data
* @return Local data for a branch
*/
@@ -2773,6 +2808,7 @@ public class AVM2Graph extends Graph {
/**
* Checks switch statement.
*
* @param localData Local data
* @param switchItem Switch item
* @param otherSides Other sides
@@ -2788,7 +2824,8 @@ public class AVM2Graph extends Graph {
}
AVM2LocalData avm2LocalData = (AVM2LocalData) localData;
SetLocalAVM2Item setLocal = (SetLocalAVM2Item) output.get(output.size() - 1);
int setLocalIp = InstructionDefinition.getItemIp(avm2LocalData, setLocal);;
int setLocalIp = InstructionDefinition.getItemIp(avm2LocalData, setLocal);
;
Set<Integer> allUsages = new HashSet<>(avm2LocalData.getSetLocalUsages(setLocalIp));
boolean isOtherSideReg = false;
for (GraphTargetItem otherSide : otherSides) {
@@ -2813,6 +2850,7 @@ public class AVM2Graph extends Graph {
/**
* Checks if part is a switch.
*
* @param part Part
* @return True if part is a switch
*/
@@ -2826,6 +2864,7 @@ public class AVM2Graph extends Graph {
/**
* Gets throw states.
*
* @param localData Local data
* @param allParts All parts
* @return List of ThrowStates
@@ -2913,6 +2952,7 @@ public class AVM2Graph extends Graph {
/**
* Walk catch parts register.
*
* @param registerId Register id
* @param part Part
* @param startIp Start ip
@@ -2955,6 +2995,7 @@ public class AVM2Graph extends Graph {
/**
* Walk catch parts.
*
* @param stats Code stats
* @param part Part
* @param startIp Start ip
@@ -3026,8 +3067,9 @@ public class AVM2Graph extends Graph {
}
/**
* Moves all stack items to commands.
* (If it's not a branch stack resistant or other special case)
* Moves all stack items to commands. (If it's not a branch stack resistant
* or other special case)
*
* @param commands Commands
* @param stack Stack
*/
@@ -3043,8 +3085,9 @@ public class AVM2Graph extends Graph {
}
/**
* Prepares second pass data.
* Can return null when no second pass will happen.
* Prepares second pass data. Can return null when no second pass will
* happen.
*
* @param list List of GraphTargetItems
* @return Second pass data or null
*/

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -38,6 +38,7 @@ import java.util.Set;
/**
* AVM2 graph source.
*
* @author JPEXS
*/
public class AVM2GraphSource extends GraphSource {
@@ -94,6 +95,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Get AVM2 code
*
* @return AVM2 code
*/
public AVM2Code getCode() {
@@ -102,6 +104,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Constructs a new AVM2 graph source
*
* @param code AVM2 code
* @param isStatic Is static
* @param scriptIndex Script index
@@ -129,6 +132,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Gets important addresses
*
* @return Important addresses
*/
@Override
@@ -138,6 +142,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Converts instruction at the specified position to string
*
* @param pos Position of the instruction
* @return Instruction as string
*/
@@ -151,6 +156,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Gets the size of the graph source
*
* @return The size of the graph source
*/
@Override
@@ -160,6 +166,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Gets the graph source item at the specified position
*
* @param pos Position of the graph source item
* @return The graph source item at the specified position
*/
@@ -170,6 +177,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Checks if the graph source is empty
*
* @return True if the graph source is empty, false otherwise
*/
@Override
@@ -179,6 +187,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Translates the part of the graph source
*
* @param graph Graph
* @param part Graph part
* @param localData Local data
@@ -202,6 +211,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Converts address to position
*
* @param adr Address
* @return Position
*/
@@ -212,6 +222,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Converts address to position
*
* @param adr Address
* @param nearest Nearest
* @return Position
@@ -223,6 +234,7 @@ public class AVM2GraphSource extends GraphSource {
/**
* Converts position to address
*
* @param pos Position
* @return Address
*/

View File

@@ -1,4 +1,4 @@
/**
* AVM2 control flow graph.
*/
package com.jpexs.decompiler.flash.abc.avm2.graph;
package com.jpexs.decompiler.flash.abc.avm2.graph;

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -49,6 +49,7 @@ import java.util.Map;
/**
* AVM2 instruction.
*
* @author JPEXS
*/
public class AVM2Instruction implements Cloneable, GraphSourceItem {
@@ -107,6 +108,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets file offset.
*
* @return File offset
*/
@Override
@@ -116,6 +118,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the line offset.
*
* @return Line offset
*/
@Override
@@ -128,6 +131,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Sets file and line.
*
* @param file File
* @param line Line
*/
@@ -138,6 +142,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Constructs a new AVM2 instruction.
*
* @param offset Offset
* @param instructionCode Instruction code
* @param operands Operands
@@ -148,6 +153,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Constructs a new AVM2 instruction.
*
* @param address Address
* @param definition Definition
* @param operands Operands
@@ -160,6 +166,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the bytes.
*
* @return Bytes
*/
public byte[] getBytes() {
@@ -200,6 +207,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the length of the bytes.
*
* @return Length of the bytes
*/
@Override
@@ -236,6 +244,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the offsets.
*
* @return Offsets
*/
public List<Long> getOffsets() {
@@ -262,6 +271,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the parameter.
*
* @param constants Constants
* @param idx Index of operand
* @return Parameter
@@ -295,6 +305,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the parameter as a long.
*
* @param constants Constants
* @param idx Index of operand
* @return Parameter as a long
@@ -305,6 +316,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets all parameters as string.
*
* @param constants Constants
* @param fullyQualifiedNames Fully qualified names
* @return All parameters as string
@@ -482,6 +494,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the comment.
*
* @return Comment
*/
public String getComment() {
@@ -496,6 +509,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Checks whether this item is ignored.
*
* @return True if this item is ignored, false otherwise
*/
@Override
@@ -505,6 +519,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* To string.
*
* @return String
*/
@Override
@@ -522,6 +537,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* To string.
*
* @param writer Writer
* @param localData Local data
* @return Writer
@@ -534,6 +550,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the customized instruction name.
*
* @return Customized instruction name
*/
private String getCustomizedInstructionName() {
@@ -545,6 +562,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* To string without address.
*
* @param constants Constants
* @param fullyQualifiedNames Fully qualified names
* @return String without address
@@ -562,6 +580,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Translate the item to target items.
*
* @param localData Local data
* @param stack Stack
* @param output Output list
@@ -581,6 +600,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the number of stack items that are popped by this item.
*
* @param localData Local data
* @param stack Stack
* @return Number of stack items that are popped by this item
@@ -593,6 +613,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the number of stack items that are popped by this item.
*
* @param aLocalData Local data
* @return Number of stack items that are popped by this item
*/
@@ -602,6 +623,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the number of stack items that are pushed by this item.
*
* @param localData Local data
* @param stack Stack
* @return Number of stack items that are pushed by this item
@@ -614,6 +636,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the number of stack items that are pushed by this item.
*
* @param aLocalData Local data
* @return Number of stack items that are pushed by this item
*/
@@ -623,6 +646,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Checks whether this item is a jump.
*
* @return True if this item is a jump, false otherwise
*/
@Override
@@ -632,6 +656,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Checks whether this item is a branch.
*
* @return True if this item is a branch, false otherwise
*/
@Override
@@ -641,6 +666,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Checks whether this item is an exit (throw, return, etc.).
*
* @return True if this item is an exit, false otherwise
*/
@Override
@@ -650,6 +676,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the address.
*
* @return Address
*/
@Override
@@ -659,6 +686,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Sets the address.
*
* @param address Address
*/
public void setAddress(long address) {
@@ -667,6 +695,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the target address of jump.
*
* @return Target address.
*/
public long getTargetAddress() {
@@ -675,15 +704,16 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Sets the target offset of jump.
*
* @param offset Offset
*/
public void setTargetOffset(int offset) {
operands[0] = offset;
}
/**
* Gets branches
*
* @param code Code
* @return List of IPs to branch to
*/
@@ -708,6 +738,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Checks whether the loops are ignored.
*
* @return True if the loops are ignored, false otherwise
*/
@Override
@@ -717,6 +748,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Sets whether this item is ignored.
*
* @param ignored True if this item is ignored, false otherwise
* @param pos Sub position
*/
@@ -726,9 +758,11 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
}
/**
* Checks whether this item is a DeobfuscatePop instruction.
* It is a special instruction for deobfuscation.
* @return True if this item is a DeobfuscatePop instruction, false otherwise
* Checks whether this item is a DeobfuscatePop instruction. It is a special
* instruction for deobfuscation.
*
* @return True if this item is a DeobfuscatePop instruction, false
* otherwise
*/
@Override
public boolean isDeobfuscatePop() {
@@ -737,6 +771,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Clone the instruction.
*
* @return Cloned instruction
*/
@Override
@@ -754,6 +789,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the line in the high level source code.
*
* @return Line
*/
@Override
@@ -763,6 +799,7 @@ public class AVM2Instruction implements Cloneable, GraphSourceItem {
/**
* Gets the high level source code file name.
*
* @return File name
*/
@Override

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions;
/**
* Flags for AVM2 instructions.
*
* @author JPEXS
*/
public enum AVM2InstructionFlag {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -18,6 +18,7 @@ package com.jpexs.decompiler.flash.abc.avm2.instructions;
/**
* Set of AVM2 instructions.
*
* @author JPEXS
*/
public class AVM2Instructions {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -24,8 +24,8 @@ import com.jpexs.decompiler.graph.TranslateStack;
import java.util.List;
/**
* DeobfuscatePop instruction.
* Special pop pused for deobfuscation purposes.
* DeobfuscatePop instruction. Special pop pused for deobfuscation purposes.
*
* @author JPEXS
*/
public class DeobfuscatePopIns extends PopIns {
@@ -42,6 +42,7 @@ public class DeobfuscatePopIns extends PopIns {
/**
* Returns singleton instance
*
* @return Singleton instance
*/
public static final DeobfuscatePopIns getInstance() {
@@ -55,9 +56,9 @@ public class DeobfuscatePopIns extends PopIns {
instructionName = NAME;
}
/**
* Translates instruction to high level code.
*
* @param localData Local data area
* @param stack Translate stack
* @param ins Instruction
@@ -71,6 +72,7 @@ public class DeobfuscatePopIns extends PopIns {
/**
* Gets number of pops from stack.
*
* @param ins Instruction
* @param abc ABC
* @return Number of pops from stack

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -22,13 +22,15 @@ import com.jpexs.decompiler.graph.TranslateStack;
import java.util.HashMap;
/**
* IfType instruction interface.
* IfType instruction interface.
*
* @author JPEXS
*/
public interface IfTypeIns {
/**
* Translates the instruction as inverted.
*
* @param localData Local data
* @param localRegs Local registers
* @param stack Stack

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -73,6 +73,7 @@ import java.util.Set;
/**
* AVM2 Instruction definition.
*
* @author JPEXS
*/
public abstract class InstructionDefinition implements Serializable {
@@ -109,6 +110,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Constructs new instance
*
* @param instructionCode Instruction code
* @param instructionName Instruction name
* @param operands Operands
@@ -125,6 +127,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Checks if instruction has flag
*
* @param flag Flag
* @return True if instruction has flag
*/
@@ -139,6 +142,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* To string
*
* @return String representation
*/
@Override
@@ -153,6 +157,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Verify instruction
*
* @param lda Local data area
* @param constants Constant pool
* @param ins Instruction
@@ -212,7 +217,9 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Checks if instruction cannot be statically computed.
* @return True = cannot be statically computed, false = can be statically computed
*
* @return True = cannot be statically computed, false = can be statically
* computed
*/
public boolean isNotCompileTimeSupported() {
return false;
@@ -220,6 +227,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Executes instruction.
*
* @param lda Local data area
* @param constants Constant pool
* @param ins Instruction
@@ -233,6 +241,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Throws illegal opcode exception.
*
* @param lda Local data area
* @param ins Instruction
* @throws AVM2VerifyErrorException
@@ -243,6 +252,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Translates instruction to high level code.
*
* @param localData Local data area
* @param stack Translate stack
* @param ins Instruction
@@ -255,6 +265,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Translates instruction to high level code.
*
* @param switchParts Switch parts
* @param callStack Call stack
* @param abcIndex ABC indexing
@@ -309,6 +320,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Gets number of pops from stack.
*
* @param ins Instruction
* @param abc ABC
* @return Number of pops from stack
@@ -319,6 +331,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Gets number of pushes to stack.
*
* @param ins Instruction
* @param abc ABC
* @return Number of pushes to stack
@@ -329,6 +342,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Resolves multiname.
*
* @param localData Local data area
* @param constants Constant pool
* @param multinameIndex Multiname index
@@ -347,6 +361,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Resolves multiname.
*
* @param localData Local data area
* @param property Property
* @param stack Translate stack
@@ -373,6 +388,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Gets required stack size for multiname.
*
* @param constants Constant pool
* @param multinameIndex Multiname index
* @return Required stack size
@@ -398,6 +414,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Gets stack delta. Stack push count - stack pop count.
*
* @param ins Instruction
* @param abc ABC
* @return Stack delta
@@ -408,6 +425,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Gets scope stack delta. Scope stack push count - scope stack pop count.
*
* @param ins Instruction
* @param abc ABC
* @return Scope stack delta
@@ -418,6 +436,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Checks if instruction is exit instruction. (e.g. return, throw)
*
* @return True if instruction is exit instruction
*/
public boolean isExitInstruction() {
@@ -426,6 +445,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Gets item IP.
*
* @param localData Local data
* @param item Item
* @return Item IP or -1 if not found
@@ -440,6 +460,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Searches for slot name.
*
* @param slotIndex Slot index
* @param localData Local data
* @param obj Object
@@ -452,6 +473,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Searches for slot name.
*
* @param slotIndex Slot index
* @param localData Local data
* @param obj Object
@@ -505,6 +527,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Handles set property.
*
* @param init Init
* @param localData Local data
* @param stack Translate stack
@@ -761,6 +784,7 @@ public abstract class InstructionDefinition implements Serializable {
/**
* Checks if increment or decrement.
*
* @param standalone Standalone
* @param multinameIndex Multiname index
* @param ins Instruction

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -30,12 +30,14 @@ import java.util.List;
/**
* SetType instruction interface.
*
* @author JPEXS
*/
public interface SetTypeIns {
/**
* Handles number to int conversion.
*
* @param value Value to convert
* @param type Type to convert to
* @return Value
@@ -53,6 +55,7 @@ public interface SetTypeIns {
/**
* Handles result.
*
* @param value Value
* @param stack Stack
* @param output Output

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -23,12 +23,14 @@ import com.jpexs.decompiler.flash.abc.avm2.exceptions.AVM2VerifyErrorException;
/**
* Unknown instruction definition.
*
* @author JPEXS
*/
public class UnknownInstruction extends InstructionDefinition {
/**
* Constructs a new UnknownInstruction object.
*
* @param instructionCode Instruction code
*/
public UnknownInstruction(int instructionCode) {
@@ -37,6 +39,7 @@ public class UnknownInstruction extends InstructionDefinition {
/**
* Verify instruction
*
* @param lda Local data area
* @param constants Constant pool
* @param ins Instruction
@@ -49,6 +52,7 @@ public class UnknownInstruction extends InstructionDefinition {
/**
* Executes instruction.
*
* @param lda Local data area
* @param constants Constant pool
* @param ins Instruction

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -20,6 +20,7 @@ import com.jpexs.decompiler.graph.DottedChain;
/**
* Alchemy instruction - for domain memory access.
*
* @author JPEXS
*/
public interface AlchemyTypeIns {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -32,6 +32,7 @@ import java.util.List;
/**
* lf32 instruction - Load 32-bit float from domain memory.
*
* @author JPEXS
*/
public class Lf32Ins extends InstructionDefinition implements AlchemyTypeIns {

View File

@@ -1,16 +1,16 @@
/*
* Copyright (C) 2010-2024 JPEXS, All rights reserved.
*
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 3.0 of the License, or (at your option) any later version.
*
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library.
*/
@@ -32,6 +32,7 @@ import java.util.List;
/**
* lf64 instruction - Load 64-bit float from domain memory.
*
* @author JPEXS
*/
public class Lf64Ins extends InstructionDefinition implements AlchemyTypeIns {

Some files were not shown because too many files have changed in this diff Show More