new execute stuff
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package info.sigterm.deob.pool;
|
||||
|
||||
import info.sigterm.deob.ConstantPool;
|
||||
import info.sigterm.deob.execution.Type;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -51,10 +52,10 @@ public class Class extends PoolEntry
|
||||
{
|
||||
out.writeShort(index);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public Object getObject()
|
||||
public Type getTypeClass()
|
||||
{
|
||||
return name;
|
||||
return new Type(name);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package info.sigterm.deob.pool;
|
||||
|
||||
import info.sigterm.deob.ConstantPool;
|
||||
import info.sigterm.deob.execution.Type;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -43,9 +44,9 @@ public class Double extends PoolEntry
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObject()
|
||||
public Type getTypeClass()
|
||||
{
|
||||
return value;
|
||||
return new Type(double.class.getCanonicalName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package info.sigterm.deob.pool;
|
||||
|
||||
import info.sigterm.deob.ConstantPool;
|
||||
import info.sigterm.deob.execution.Type;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -37,9 +38,9 @@ public class Float extends PoolEntry
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObject()
|
||||
public Type getTypeClass()
|
||||
{
|
||||
return value;
|
||||
return new Type(float.class.getCanonicalName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package info.sigterm.deob.pool;
|
||||
|
||||
import info.sigterm.deob.ConstantPool;
|
||||
import info.sigterm.deob.execution.Type;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -37,9 +38,9 @@ public class Integer extends PoolEntry
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObject()
|
||||
public Type getTypeClass()
|
||||
{
|
||||
return value;
|
||||
return new Type(int.class.getCanonicalName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package info.sigterm.deob.pool;
|
||||
|
||||
import info.sigterm.deob.ConstantPool;
|
||||
import info.sigterm.deob.execution.Type;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -43,9 +44,9 @@ public class Long extends PoolEntry
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObject()
|
||||
public Type getTypeClass()
|
||||
{
|
||||
return value;
|
||||
return new Type(long.class.getCanonicalName());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -103,7 +103,7 @@ public class NameAndType extends PoolEntry
|
||||
return 0d;
|
||||
case "F":
|
||||
return 0f;
|
||||
case "L":
|
||||
case "J":
|
||||
return 0L;
|
||||
default:
|
||||
return null;
|
||||
@@ -115,11 +115,11 @@ public class NameAndType extends PoolEntry
|
||||
return signature.size();
|
||||
}
|
||||
|
||||
public boolean isNonVoid()
|
||||
public boolean isVoid()
|
||||
{
|
||||
if (this.getName().equals("<init>") || this.getName().equals("<clinit>"))
|
||||
return true;
|
||||
return !signature.getReturnValue().equals("V");
|
||||
return true;
|
||||
return signature.getReturnValue().getType().equals("V");
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
@@ -4,6 +4,7 @@ import java.io.DataOutputStream;
|
||||
import java.io.IOException;
|
||||
|
||||
import info.sigterm.deob.ConstantPool;
|
||||
import info.sigterm.deob.execution.Type;
|
||||
|
||||
public abstract class PoolEntry
|
||||
{
|
||||
@@ -40,14 +41,14 @@ public abstract class PoolEntry
|
||||
{
|
||||
return type;
|
||||
}
|
||||
|
||||
public Type getTypeClass()
|
||||
{
|
||||
throw new UnsupportedOperationException();
|
||||
}
|
||||
|
||||
public int getSlots()
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
public Object getObject()
|
||||
{
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
package info.sigterm.deob.pool;
|
||||
|
||||
import info.sigterm.deob.ConstantPool;
|
||||
import info.sigterm.deob.execution.Type;
|
||||
|
||||
import java.io.DataInputStream;
|
||||
import java.io.DataOutputStream;
|
||||
@@ -39,6 +40,12 @@ public class String extends PoolEntry
|
||||
stringIndex = this.getPool().makeUTF8(string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Type getTypeClass()
|
||||
{
|
||||
return new Type(java.lang.String.class.getCanonicalName());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(Object other)
|
||||
{
|
||||
@@ -49,12 +56,6 @@ public class String extends PoolEntry
|
||||
return string.equals(s.string);
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObject()
|
||||
{
|
||||
return string;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(DataOutputStream out) throws IOException
|
||||
{
|
||||
|
||||
@@ -39,12 +39,6 @@ public class UTF8 extends PoolEntry
|
||||
{
|
||||
return string;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Object getObject()
|
||||
{
|
||||
return getValue();
|
||||
}
|
||||
|
||||
@Override
|
||||
public void write(DataOutputStream out) throws IOException
|
||||
|
||||
Reference in New Issue
Block a user