Examples of MethodInfoList


Examples of tv.porst.swfretools.parser.structures.MethodInfoList

    assert data != null : "Data argument must not be null";
    assert errors != null : "Errors argument must not be null";

    final Map<MethodInfo, ResolvedMethod> methodMapping = new HashMap<MethodInfo, ResolvedMethod>();

    final MethodInfoList methodInfos = data.getMethodInfos();
    final MethodBodyList methodBodies = data.getMethodBodies();

    final ConstantPool constantPool = data.getConstantPool();
    final StringInfoList constantStrings = constantPool.getStrings();
    final MultinameInfoList multiNames = constantPool.getMultinames();
    final NamespaceInfoList namespaces = constantPool.getNamespaces();

    // In the first round we are using the existing mapping between method bodies
    // and method information fields to create the inverse mapping.
    for (final MethodBody methodBody : methodBodies) {

      final int methodIndex = methodBody.getMethod().value();

      if (methodIndex >= methodInfos.size()) {
        errors.add(String.format("Can not find method header for method %d because method header ID is out of bounds", methodIndex));
      }
      else {
        final MethodInfo methodInfo = data.getMethodInfos().get(methodIndex);
View Full Code Here

Examples of tv.porst.swfretools.parser.structures.MethodInfoList

    final ConstantPool constantPool = data.getConstantPool();
    final StringInfoList constantStrings = constantPool.getStrings();
    final MultinameInfoList multiNames = constantPool.getMultinames();
    final NamespaceInfoList namespaces = constantPool.getNamespaces();
    final MethodInfoList methodList = data.getMethodInfos();

    final ResolvedMethod staticConstructor = resolveStaticConstructor(classInfo, data, methodMapping, errors);
    final ResolvedMethod constructor = resolveConstructor(instanceInfo, data, methodMapping, errors);

    final String[] className = resolveClassName(instanceInfo, constantStrings, multiNames, namespaces, errors);
View Full Code Here

Examples of tv.porst.swfretools.parser.structures.MethodInfoList

    assert methodMapping != null : "Method mapping argument must not be null";
    assert errors != null : "Errors list must not be null";

    final int constructorId = instanceInfo.getIinit().value();

    final MethodInfoList methodInfos = data.getMethodInfos();

    if (constructorId >= methodInfos.size()) {
      errors.add(String.format("The constructor of the class at offset %08X could not be resolved as its method index is out of bounds", instanceInfo.getBitPosition() / 8));
      return null;
    }
    else {
      final ResolvedMethod resolvedConstructor = methodMapping.get(methodInfos.get(constructorId));
      return new ResolvedMethod(new String[0], new String[] { "constructor" }, resolvedConstructor.getArguments(), resolvedConstructor == null ? null : resolvedConstructor.getCode());
    }
  }
View Full Code Here

Examples of tv.porst.swfretools.parser.structures.MethodInfoList

    assert methodMapping != null : "Method mapping argument must not be null";
    assert errors != null : "Errors list must not be null";

    final int staticConstructorId = classInfo.getcInit().value();

    final MethodInfoList methodInfos = data.getMethodInfos();

    if (staticConstructorId >= methodInfos.size()) {
      errors.add(String.format("The static constructor of the class at offset %08X could not be resolved as its method index is out of bounds", classInfo.getBitPosition() / 8));
      return null;
    }
    else {
      final ResolvedMethod resolvedStaticConstructor = methodMapping.get(methodInfos.get(staticConstructorId));
      return new ResolvedMethod(new String[0], new String[] { "staticconstructor" }, new ArrayList<String[]>(), resolvedStaticConstructor == null ? null : resolvedStaticConstructor.getCode());
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.