java source code formatting

This commit is contained in:
honfika
2014-06-22 09:52:54 +02:00
parent 38335ec2e4
commit 6e7e92ddf2
63 changed files with 3160 additions and 3196 deletions
+37 -37
View File
@@ -803,22 +803,22 @@ public class ABC {
}
}
private void checkMultinameUsedInMethod(List<ABCContainerTag> abcTags,int multinameIndex, int methodInfo, List<MultinameUsage> ret, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
private void checkMultinameUsedInMethod(List<ABCContainerTag> abcTags, int multinameIndex, int methodInfo, List<MultinameUsage> ret, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
for (int p = 0; p < method_info.get(methodInfo).param_types.length; p++) {
if (method_info.get(methodInfo).param_types[p] == multinameIndex) {
ret.add(new MethodParamsMultinameUsage(abcTags,this,multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex));
ret.add(new MethodParamsMultinameUsage(abcTags, this, multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex));
break;
}
}
if (method_info.get(methodInfo).ret_type == multinameIndex) {
ret.add(new MethodReturnTypeMultinameUsage(abcTags,this,multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex));
ret.add(new MethodReturnTypeMultinameUsage(abcTags, this, multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex));
}
MethodBody body = findBody(methodInfo);
if (body != null) {
findMultinameUsageInTraits(abcTags,body.traits, multinameIndex, isStatic, classIndex, ret, traitIndex);
findMultinameUsageInTraits(abcTags, body.traits, multinameIndex, isStatic, classIndex, ret, traitIndex);
for (ABCException e : body.exceptions) {
if ((e.name_index == multinameIndex) || (e.type_index == multinameIndex)) {
ret.add(new MethodBodyMultinameUsage(abcTags,this,multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex));
ret.add(new MethodBodyMultinameUsage(abcTags, this, multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex));
return;
}
}
@@ -826,7 +826,7 @@ public class ABC {
for (int o = 0; o < ins.definition.operands.length; o++) {
if (ins.definition.operands[o] == AVM2Code.DAT_MULTINAME_INDEX) {
if (ins.operands[o] == multinameIndex) {
ret.add(new MethodBodyMultinameUsage(abcTags,this,multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex));
ret.add(new MethodBodyMultinameUsage(abcTags, this, multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex));
return;
}
}
@@ -835,70 +835,70 @@ public class ABC {
}
}
private void findMultinameUsageInTraits(List<ABCContainerTag> abcTags,Traits traits, int multinameIndex, boolean isStatic, int classIndex, List<MultinameUsage> ret, int parentTraitIndex) {
private void findMultinameUsageInTraits(List<ABCContainerTag> abcTags, Traits traits, int multinameIndex, boolean isStatic, int classIndex, List<MultinameUsage> ret, int parentTraitIndex) {
for (int t = 0; t < traits.traits.size(); t++) {
if (traits.traits.get(t) instanceof TraitSlotConst) {
TraitSlotConst tsc = (TraitSlotConst) traits.traits.get(t);
if (tsc.name_index == multinameIndex) {
ret.add(new ConstVarNameMultinameUsage(abcTags,this,multinameIndex, classIndex, t, isStatic, traits, parentTraitIndex));
ret.add(new ConstVarNameMultinameUsage(abcTags, this, multinameIndex, classIndex, t, isStatic, traits, parentTraitIndex));
}
if (tsc.type_index == multinameIndex) {
ret.add(new ConstVarTypeMultinameUsage(abcTags,this,multinameIndex, classIndex, t, isStatic, traits, parentTraitIndex));
ret.add(new ConstVarTypeMultinameUsage(abcTags, this, multinameIndex, classIndex, t, isStatic, traits, parentTraitIndex));
}
}
if (traits.traits.get(t) instanceof TraitMethodGetterSetter) {
TraitMethodGetterSetter tmgs = (TraitMethodGetterSetter) traits.traits.get(t);
if (tmgs.name_index == multinameIndex) {
ret.add(new MethodNameMultinameUsage(abcTags,this,multinameIndex, classIndex, t, isStatic, false, traits, parentTraitIndex));
ret.add(new MethodNameMultinameUsage(abcTags, this, multinameIndex, classIndex, t, isStatic, false, traits, parentTraitIndex));
}
checkMultinameUsedInMethod(abcTags,multinameIndex, tmgs.method_info, ret, classIndex, t, isStatic, false, traits, parentTraitIndex);
checkMultinameUsedInMethod(abcTags, multinameIndex, tmgs.method_info, ret, classIndex, t, isStatic, false, traits, parentTraitIndex);
}
}
}
public List<MultinameUsage> findMultinameDefinition(List<ABCContainerTag> abcTags,int multinameIndex){
List<MultinameUsage> usages = findMultinameUsage(abcTags,multinameIndex);
public List<MultinameUsage> findMultinameDefinition(List<ABCContainerTag> abcTags, int multinameIndex) {
List<MultinameUsage> usages = findMultinameUsage(abcTags, multinameIndex);
List<MultinameUsage> ret = new ArrayList<>();
for(MultinameUsage u:usages){
if(u instanceof DefinitionUsage){
for (MultinameUsage u : usages) {
if (u instanceof DefinitionUsage) {
ret.add(u);
}
}
return ret;
}
public List<MultinameUsage> findMultinameUsage(List<ABCContainerTag> abcTags,int multinameIndex) {
public List<MultinameUsage> findMultinameUsage(List<ABCContainerTag> abcTags, int multinameIndex) {
List<MultinameUsage> ret = new ArrayList<>();
if (multinameIndex == 0) {
return ret;
}
for (int c = 0; c < instance_info.size(); c++) {
if (instance_info.get(c).name_index == multinameIndex) {
ret.add(new ClassNameMultinameUsage(abcTags,this,multinameIndex, c));
ret.add(new ClassNameMultinameUsage(abcTags, this, multinameIndex, c));
}
if (instance_info.get(c).super_index == multinameIndex) {
ret.add(new ExtendsMultinameUsage(abcTags,this,multinameIndex, c));
ret.add(new ExtendsMultinameUsage(abcTags, this, multinameIndex, c));
}
for (int i = 0; i < instance_info.get(c).interfaces.length; i++) {
if (instance_info.get(c).interfaces[i] == multinameIndex) {
ret.add(new ImplementsMultinameUsage(abcTags,this,multinameIndex, c));
ret.add(new ImplementsMultinameUsage(abcTags, this, multinameIndex, c));
}
}
checkMultinameUsedInMethod(abcTags,multinameIndex, instance_info.get(c).iinit_index, ret, c, 0, false, true, null, -1);
checkMultinameUsedInMethod(abcTags,multinameIndex, class_info.get(c).cinit_index, ret, c, 0, true, true, null, -1);
findMultinameUsageInTraits(abcTags,instance_info.get(c).instance_traits, multinameIndex, false, c, ret, -1);
findMultinameUsageInTraits(abcTags,class_info.get(c).static_traits, multinameIndex, true, c, ret, -1);
checkMultinameUsedInMethod(abcTags, multinameIndex, instance_info.get(c).iinit_index, ret, c, 0, false, true, null, -1);
checkMultinameUsedInMethod(abcTags, multinameIndex, class_info.get(c).cinit_index, ret, c, 0, true, true, null, -1);
findMultinameUsageInTraits(abcTags, instance_info.get(c).instance_traits, multinameIndex, false, c, ret, -1);
findMultinameUsageInTraits(abcTags, class_info.get(c).static_traits, multinameIndex, true, c, ret, -1);
}
loopm:
for (int m = 1; m < constants.getMultinameCount(); m++) {
if (constants.getMultiname(m).kind == Multiname.TYPENAME) {
if (constants.getMultiname(m).qname_index == multinameIndex) {
ret.add(new TypeNameMultinameUsage(abcTags,this,m));
ret.add(new TypeNameMultinameUsage(abcTags, this, m));
continue;
}
for (int mp : constants.getMultiname(m).params) {
if (mp == multinameIndex) {
ret.add(new TypeNameMultinameUsage(abcTags,this,m));
ret.add(new TypeNameMultinameUsage(abcTags, this, m));
continue loopm;
}
}
@@ -947,36 +947,36 @@ public class ABC {
}
return -1;
}
public List<ScriptPack> findScriptPacksByPath(String name) {
List<ScriptPack> ret = new ArrayList<>();
List<MyEntry<ClassPath, ScriptPack>> allPacks = getScriptPacks();
if(name.endsWith(".**")||name.equals("**")||name.endsWith(".++") || name.equals("++")){
name = name.substring(0,name.length()-2);
if (name.endsWith(".**") || name.equals("**") || name.endsWith(".++") || name.equals("++")) {
name = name.substring(0, name.length() - 2);
for (MyEntry<ClassPath, ScriptPack> en : allPacks) {
if (en.key.toString().startsWith(name)) {
ret.add(en.value);
}
}
} else if(name.endsWith(".*")||name.equals("*")||name.endsWith(".+")||name.equals("+")){
name = name.substring(0,name.length()-1);
} else if (name.endsWith(".*") || name.equals("*") || name.endsWith(".+") || name.equals("+")) {
name = name.substring(0, name.length() - 1);
for (MyEntry<ClassPath, ScriptPack> en : allPacks) {
if (en.key.toString().startsWith(name)) {
String rem = name.isEmpty()?en.key.toString():en.key.toString().substring(name.length());
if(!rem.contains(".")){
String rem = name.isEmpty() ? en.key.toString() : en.key.toString().substring(name.length());
if (!rem.contains(".")) {
ret.add(en.value);
}
}
}
} else {
ScriptPack p = findScriptPackByPath(name);
if(p!=null){
if (p != null) {
ret.add(p);
}
}
}
return ret;
}
public ScriptPack findScriptPackByPath(String name) {
@@ -1,74 +1,74 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.stack;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
import com.jpexs.decompiler.flash.abc.avm2.model.CallAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.CallMethodAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.CallPropertyAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.CallStaticAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.CallSuperAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item;
import com.jpexs.decompiler.flash.abc.types.MethodBody;
import com.jpexs.decompiler.flash.abc.types.MethodInfo;
import com.jpexs.decompiler.graph.GraphTargetItem;
import java.util.HashMap;
import java.util.List;
import java.util.Stack;
public class PopIns extends InstructionDefinition {
public PopIns() {
super(0x29, "pop", new int[]{});
}
@Override
public void execute(LocalDataArea lda, ConstantPool constants, List<Object> arguments) {
lda.operandStack.pop();
}
@Override
public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap<Integer, GraphTargetItem> localRegs, Stack<GraphTargetItem> stack, java.util.Stack<GraphTargetItem> scopeStack, ConstantPool constants, AVM2Instruction ins, List<MethodInfo> method_info, List<GraphTargetItem> output, MethodBody body, ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames, String path, HashMap<Integer, Integer> localRegsAssignmentIps, int ip, HashMap<Integer, List<Integer>> refs, AVM2Code code) {
if (stack.size() > 0) {
GraphTargetItem top = stack.pop();
//TODO: handle all values (#585) - beware collision with return inside finally block
if (top instanceof CallPropertyAVM2Item) {
output.add(top);
} else if (top instanceof CallSuperAVM2Item) {
output.add(top);
} else if (top instanceof CallStaticAVM2Item) {
output.add(top);
} else if (top instanceof CallMethodAVM2Item) {
output.add(top);
} else if (top instanceof CallAVM2Item) {
output.add(top);
} else if (top instanceof AssignmentAVM2Item) {
output.add(top);
}
}
}
@Override
public int getStackDelta(AVM2Instruction ins, ABC abc) {
return -1;
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.avm2.instructions.stack;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.avm2.AVM2Code;
import com.jpexs.decompiler.flash.abc.avm2.ConstantPool;
import com.jpexs.decompiler.flash.abc.avm2.LocalDataArea;
import com.jpexs.decompiler.flash.abc.avm2.instructions.AVM2Instruction;
import com.jpexs.decompiler.flash.abc.avm2.instructions.InstructionDefinition;
import com.jpexs.decompiler.flash.abc.avm2.model.CallAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.CallMethodAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.CallPropertyAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.CallStaticAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.CallSuperAVM2Item;
import com.jpexs.decompiler.flash.abc.avm2.model.clauses.AssignmentAVM2Item;
import com.jpexs.decompiler.flash.abc.types.MethodBody;
import com.jpexs.decompiler.flash.abc.types.MethodInfo;
import com.jpexs.decompiler.graph.GraphTargetItem;
import java.util.HashMap;
import java.util.List;
import java.util.Stack;
public class PopIns extends InstructionDefinition {
public PopIns() {
super(0x29, "pop", new int[]{});
}
@Override
public void execute(LocalDataArea lda, ConstantPool constants, List<Object> arguments) {
lda.operandStack.pop();
}
@Override
public void translate(boolean isStatic, int scriptIndex, int classIndex, java.util.HashMap<Integer, GraphTargetItem> localRegs, Stack<GraphTargetItem> stack, java.util.Stack<GraphTargetItem> scopeStack, ConstantPool constants, AVM2Instruction ins, List<MethodInfo> method_info, List<GraphTargetItem> output, MethodBody body, ABC abc, HashMap<Integer, String> localRegNames, List<String> fullyQualifiedNames, String path, HashMap<Integer, Integer> localRegsAssignmentIps, int ip, HashMap<Integer, List<Integer>> refs, AVM2Code code) {
if (stack.size() > 0) {
GraphTargetItem top = stack.pop();
//TODO: handle all values (#585) - beware collision with return inside finally block
if (top instanceof CallPropertyAVM2Item) {
output.add(top);
} else if (top instanceof CallSuperAVM2Item) {
output.add(top);
} else if (top instanceof CallStaticAVM2Item) {
output.add(top);
} else if (top instanceof CallMethodAVM2Item) {
output.add(top);
} else if (top instanceof CallAVM2Item) {
output.add(top);
} else if (top instanceof AssignmentAVM2Item) {
output.add(top);
}
}
}
@Override
public int getStackDelta(AVM2Instruction ins, ABC abc) {
return -1;
}
}
@@ -2424,10 +2424,9 @@ public class AVM2SourceGenerator implements SourceGenerator {
@Override
public List<GraphSourceItem> generateDiscardValue(SourceGeneratorLocalData localData, GraphTargetItem item) throws CompilationException {
List<GraphSourceItem> ret=item.toSource(localData, this);
List<GraphSourceItem> ret = item.toSource(localData, this);
ret.add(ins(new PopIns()));
return ret;
}
}
@@ -1,37 +1,37 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class ClassNameMultinameUsage extends InsideClassMultinameUsage implements DefinitionUsage {
public ClassNameMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex) {
super(abcTags,abc,multinameIndex, classIndex);
}
@Override
public String toString() {
return "class " + abc.constants.getMultiname(abc.instance_info.get(classIndex).name_index).getNameWithNamespace(abc.constants);
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class ClassNameMultinameUsage extends InsideClassMultinameUsage implements DefinitionUsage {
public ClassNameMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex) {
super(abcTags, abc, multinameIndex, classIndex);
}
@Override
public String toString() {
return "class " + abc.constants.getMultiname(abc.instance_info.get(classIndex).name_index).getNameWithNamespace(abc.constants);
}
}
@@ -35,7 +35,7 @@ import java.util.List;
public abstract class ConstVarMultinameUsage extends TraitMultinameUsage {
public ConstVarMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, Traits traits, int parentTraitIndex) {
super(abcTags,abc,multinameIndex, classIndex, traitIndex, isStatic, traits, parentTraitIndex);
super(abcTags, abc, multinameIndex, classIndex, traitIndex, isStatic, traits, parentTraitIndex);
}
@Override
@@ -66,7 +66,7 @@ public abstract class ConstVarMultinameUsage extends TraitMultinameUsage {
try {
((TraitSlotConst) traits.traits.get(traitIndex)).toStringHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, writer, new ArrayList<String>(), false);
} catch (InterruptedException ex) {
//ignore
//ignore
}
return writer.toString();
}
@@ -1,38 +1,38 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class ConstVarNameMultinameUsage extends ConstVarMultinameUsage implements DefinitionUsage {
public ConstVarNameMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, Traits traits, int parentTraitIndex) {
super(abcTags,abc,multinameIndex, classIndex, traitIndex, isStatic, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " name";
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class ConstVarNameMultinameUsage extends ConstVarMultinameUsage implements DefinitionUsage {
public ConstVarNameMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, Traits traits, int parentTraitIndex) {
super(abcTags, abc, multinameIndex, classIndex, traitIndex, isStatic, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " name";
}
}
@@ -1,38 +1,38 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class ConstVarTypeMultinameUsage extends ConstVarMultinameUsage {
public ConstVarTypeMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, Traits traits, int parentTraitIndex) {
super(abcTags,abc,multinameIndex, classIndex, traitIndex, isStatic, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " type";
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class ConstVarTypeMultinameUsage extends ConstVarMultinameUsage {
public ConstVarTypeMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, Traits traits, int parentTraitIndex) {
super(abcTags, abc, multinameIndex, classIndex, traitIndex, isStatic, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " type";
}
}
@@ -1,26 +1,25 @@
/*
* Copyright (C) 2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
/**
*
* @author JPEXS
*/
public interface DefinitionUsage {
}
/*
* Copyright (C) 2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
/**
*
* @author JPEXS
*/
public interface DefinitionUsage {
}
@@ -1,37 +1,37 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class ExtendsMultinameUsage extends InsideClassMultinameUsage {
public ExtendsMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex) {
super(abcTags,abc,multinameIndex, classIndex);
}
@Override
public String toString() {
return super.toString() + " extends";
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class ExtendsMultinameUsage extends InsideClassMultinameUsage {
public ExtendsMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex) {
super(abcTags, abc, multinameIndex, classIndex);
}
@Override
public String toString() {
return super.toString() + " extends";
}
}
@@ -1,37 +1,37 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class ImplementsMultinameUsage extends InsideClassMultinameUsage {
public ImplementsMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex) {
super(abcTags,abc,multinameIndex, classIndex);
}
@Override
public String toString() {
return super.toString() + " implements";
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class ImplementsMultinameUsage extends InsideClassMultinameUsage {
public ImplementsMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex) {
super(abcTags, abc, multinameIndex, classIndex);
}
@Override
public String toString() {
return super.toString() + " implements";
}
}
@@ -1,50 +1,50 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public abstract class InsideClassMultinameUsage extends MultinameUsage {
public int multinameIndex;
public int classIndex;
public InsideClassMultinameUsage(List<ABCContainerTag> abcTags, ABC abc,int multinameIndex, int classIndex) {
super(abcTags, abc);
this.multinameIndex = multinameIndex;
this.classIndex = classIndex;
}
@Override
public String toString(){
return "class " + abc.constants.getMultiname(abc.instance_info.get(classIndex).name_index).getNameWithNamespace(abc.constants);
}
public int getMultinameIndex() {
return multinameIndex;
}
public int getClassIndex() {
return classIndex;
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public abstract class InsideClassMultinameUsage extends MultinameUsage {
public int multinameIndex;
public int classIndex;
public InsideClassMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex) {
super(abcTags, abc);
this.multinameIndex = multinameIndex;
this.classIndex = classIndex;
}
@Override
public String toString() {
return "class " + abc.constants.getMultiname(abc.instance_info.get(classIndex).name_index).getNameWithNamespace(abc.constants);
}
public int getMultinameIndex() {
return multinameIndex;
}
public int getClassIndex() {
return classIndex;
}
}
@@ -1,38 +1,38 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class MethodBodyMultinameUsage extends MethodMultinameUsage {
public MethodBodyMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
super(abcTags,abc,multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " body";
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class MethodBodyMultinameUsage extends MethodMultinameUsage {
public MethodBodyMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
super(abcTags, abc, multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " body";
}
}
@@ -1,91 +1,91 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
import com.jpexs.decompiler.flash.helpers.HilightedTextWriter;
import com.jpexs.decompiler.flash.helpers.NulWriter;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author JPEXS
*/
public abstract class MethodMultinameUsage extends TraitMultinameUsage {
public boolean isInitializer;
public MethodMultinameUsage(List<ABCContainerTag> abcTags, ABC abc,int multinameIndex, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
super(abcTags,abc,multinameIndex, classIndex, traitIndex, isStatic, traits, parentTraitIndex);
this.isInitializer = isInitializer;
}
public boolean isInitializer() {
return isInitializer;
}
@Override
public String toString() {
NulWriter nulWriter = new NulWriter();
if (!isInitializer) {
if (parentTraitIndex > -1) {
if (isStatic) {
((TraitMethodGetterSetter) abc.class_info.get(classIndex).static_traits.traits.get(parentTraitIndex)).convertHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, nulWriter, new ArrayList<String>(), false);
} else {
((TraitMethodGetterSetter) abc.instance_info.get(classIndex).instance_traits.traits.get(parentTraitIndex)).convertHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, nulWriter, new ArrayList<String>(), false);
}
}
((TraitMethodGetterSetter) traits.traits.get(traitIndex)).convertHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, nulWriter, new ArrayList<String>(), false);
}
HilightedTextWriter writer = new HilightedTextWriter(Configuration.getCodeFormatting(), false);
writer.appendNoHilight(super.toString());
writer.appendNoHilight(" ");
if (isInitializer) {
if (isStatic) {
writer.appendNoHilight("class initializer");
} else {
writer.appendNoHilight("instance initializer");
}
} else {
if (parentTraitIndex > -1) {
if (isStatic) {
((TraitMethodGetterSetter) abc.class_info.get(classIndex).static_traits.traits.get(parentTraitIndex)).toStringHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, writer, new ArrayList<String>(), false);
} else {
((TraitMethodGetterSetter) abc.instance_info.get(classIndex).instance_traits.traits.get(parentTraitIndex)).toStringHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, writer, new ArrayList<String>(), false);
}
writer.appendNoHilight(" ");
}
((TraitMethodGetterSetter) traits.traits.get(traitIndex)).toStringHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, writer, new ArrayList<String>(), false);
}
return writer.toString();
}
public int getTraitIndex() {
return traitIndex;
}
public boolean isStatic() {
return isStatic;
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.TraitMethodGetterSetter;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.configuration.Configuration;
import com.jpexs.decompiler.flash.exporters.modes.ScriptExportMode;
import com.jpexs.decompiler.flash.helpers.HilightedTextWriter;
import com.jpexs.decompiler.flash.helpers.NulWriter;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.ArrayList;
import java.util.List;
/**
*
* @author JPEXS
*/
public abstract class MethodMultinameUsage extends TraitMultinameUsage {
public boolean isInitializer;
public MethodMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
super(abcTags, abc, multinameIndex, classIndex, traitIndex, isStatic, traits, parentTraitIndex);
this.isInitializer = isInitializer;
}
public boolean isInitializer() {
return isInitializer;
}
@Override
public String toString() {
NulWriter nulWriter = new NulWriter();
if (!isInitializer) {
if (parentTraitIndex > -1) {
if (isStatic) {
((TraitMethodGetterSetter) abc.class_info.get(classIndex).static_traits.traits.get(parentTraitIndex)).convertHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, nulWriter, new ArrayList<String>(), false);
} else {
((TraitMethodGetterSetter) abc.instance_info.get(classIndex).instance_traits.traits.get(parentTraitIndex)).convertHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, nulWriter, new ArrayList<String>(), false);
}
}
((TraitMethodGetterSetter) traits.traits.get(traitIndex)).convertHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, nulWriter, new ArrayList<String>(), false);
}
HilightedTextWriter writer = new HilightedTextWriter(Configuration.getCodeFormatting(), false);
writer.appendNoHilight(super.toString());
writer.appendNoHilight(" ");
if (isInitializer) {
if (isStatic) {
writer.appendNoHilight("class initializer");
} else {
writer.appendNoHilight("instance initializer");
}
} else {
if (parentTraitIndex > -1) {
if (isStatic) {
((TraitMethodGetterSetter) abc.class_info.get(classIndex).static_traits.traits.get(parentTraitIndex)).toStringHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, writer, new ArrayList<String>(), false);
} else {
((TraitMethodGetterSetter) abc.instance_info.get(classIndex).instance_traits.traits.get(parentTraitIndex)).toStringHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, writer, new ArrayList<String>(), false);
}
writer.appendNoHilight(" ");
}
((TraitMethodGetterSetter) traits.traits.get(traitIndex)).toStringHeader(null, "", abcTags, abc, isStatic, ScriptExportMode.AS, -1/*FIXME*/, classIndex, writer, new ArrayList<String>(), false);
}
return writer.toString();
}
public int getTraitIndex() {
return traitIndex;
}
public boolean isStatic() {
return isStatic;
}
}
@@ -1,38 +1,38 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class MethodNameMultinameUsage extends MethodMultinameUsage implements DefinitionUsage {
public MethodNameMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
super(abcTags,abc, multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " name";
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class MethodNameMultinameUsage extends MethodMultinameUsage implements DefinitionUsage {
public MethodNameMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
super(abcTags, abc, multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " name";
}
}
@@ -1,38 +1,38 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class MethodParamsMultinameUsage extends MethodMultinameUsage {
public MethodParamsMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
super(abcTags,abc,multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " params";
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class MethodParamsMultinameUsage extends MethodMultinameUsage {
public MethodParamsMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
super(abcTags, abc, multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " params";
}
}
@@ -1,38 +1,38 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class MethodReturnTypeMultinameUsage extends MethodMultinameUsage {
public MethodReturnTypeMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
super(abcTags,abc,multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " return type";
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public class MethodReturnTypeMultinameUsage extends MethodMultinameUsage {
public MethodReturnTypeMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, boolean isInitializer, Traits traits, int parentTraitIndex) {
super(abcTags, abc, multinameIndex, classIndex, traitIndex, isStatic, isInitializer, traits, parentTraitIndex);
}
@Override
public String toString() {
return super.toString() + " return type";
}
}
@@ -1,36 +1,37 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public abstract class MultinameUsage {
public List<ABCContainerTag> abcTags;
public ABC abc;
public MultinameUsage(List<ABCContainerTag> abcTags, ABC abc) {
this.abcTags = abcTags;
this.abc = abc;
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public abstract class MultinameUsage {
public List<ABCContainerTag> abcTags;
public ABC abc;
public MultinameUsage(List<ABCContainerTag> abcTags, ABC abc) {
this.abcTags = abcTags;
this.abc = abc;
}
}
@@ -1,42 +1,42 @@
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public abstract class TraitMultinameUsage extends InsideClassMultinameUsage {
public int traitIndex;
public boolean isStatic;
public Traits traits;
public int parentTraitIndex;
public TraitMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, Traits traits, int parentTraitIndex) {
super(abcTags,abc,multinameIndex, classIndex);
this.traitIndex = traitIndex;
this.isStatic = isStatic;
this.traits = traits;
this.parentTraitIndex = parentTraitIndex;
}
}
/*
* Copyright (C) 2010-2014 JPEXS
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* This program 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 General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
package com.jpexs.decompiler.flash.abc.usages;
import com.jpexs.decompiler.flash.abc.ABC;
import com.jpexs.decompiler.flash.abc.types.traits.Traits;
import com.jpexs.decompiler.flash.tags.ABCContainerTag;
import java.util.List;
/**
*
* @author JPEXS
*/
public abstract class TraitMultinameUsage extends InsideClassMultinameUsage {
public int traitIndex;
public boolean isStatic;
public Traits traits;
public int parentTraitIndex;
public TraitMultinameUsage(List<ABCContainerTag> abcTags, ABC abc, int multinameIndex, int classIndex, int traitIndex, boolean isStatic, Traits traits, int parentTraitIndex) {
super(abcTags, abc, multinameIndex, classIndex);
this.traitIndex = traitIndex;
this.isStatic = isStatic;
this.traits = traits;
this.parentTraitIndex = parentTraitIndex;
}
}