Class ValueTypeParser

java.lang.Object
de.inetsoftware.jwebassembly.wasm.ValueTypeParser
All Implemented Interfaces:
Iterator<AnyType>

public class ValueTypeParser extends Object implements Iterator<AnyType>
Parser for a Java signature. This can be a method signature or a signature of a field.
  • Field Details

    • sig

      private final String sig
    • idx

      private int idx
    • types

      private final TypeManager types
  • Constructor Details

    • ValueTypeParser

      public ValueTypeParser(String javaSignature, TypeManager types)
      Create a new parser.
      Parameters:
      javaSignature - the Java signature
      types - the optional type manager
  • Method Details

    • hasNext

      public boolean hasNext()
      Specified by:
      hasNext in interface Iterator<AnyType>
    • next

      public AnyType next()
      Get the next value in the signature or null if the parameter are end or the signature is end.
      Specified by:
      next in interface Iterator<AnyType>
      Returns:
      next type or null
    • next

      private AnyType next(boolean isArray)
      Get the next value in the signature or null if the parameter are end or the signature is end.
      Parameters:
      isArray - true, if this is an element type of an array
      Returns:
      next type or null