Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## javafe.reader
Class DescriptorParser

    java.lang.Object
      javafe.reader.DescriptorParser

class DescriptorParser
extends java.lang.Object

Parses various kinds of class-file-format descriptor strings into abstract syntax.

Field Summary
`(package private) static int` | `classLocation` A dummy location representing the class being parsed.

Constructor Summary
`(package private)` | `DescriptorParser()`

Method Summary
`(package private) static TypeName` | `parseClass(java.lang.String s)` Return a type name for a given class-file class-name string.
`(package private) static Type` | `parseField(java.lang.String s)` Return a type for a given class-file field descriptor string.
`(package private) static MethodSignature` | `parseMethod(java.lang.String s)` Return a method signature for a given class-file method descriptor string.
`private static Type` | `parseReturn(StringScanner scanner)` Parse a type from a given class-file return descriptor string.
`private static Type` | `parseType(StringScanner scanner)` Parse a type from a given class-file field descriptor string.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### classLocation

    static int classLocation

  A dummy location representing the class being parsed. Should be set externally.

Constructor Detail

### DescriptorParser

    DescriptorParser()

Method Detail

### parseClass

    static TypeName parseClass(java.lang.String s)
                        throws java.lang.ClassFormatError

  Return a type name for a given class-file class-name string.

  Parameters:
    `s` - the class name to parse
  Returns:
    the type name encoded by s
  Throws:
    `java.lang.ClassFormatError`

### parseField

    static Type parseField(java.lang.String s)
                    throws java.lang.ClassFormatError

  Return a type for a given class-file field descriptor string.

  Parameters:
    `s` - the field descriptor to parse
  Returns:
    the type encoded by s
  Throws:
    `java.lang.ClassFormatError`

### parseMethod

    static MethodSignature parseMethod(java.lang.String s)
                                throws java.lang.ClassFormatError

  Return a method signature for a given class-file method descriptor string.

  Parameters:
    `s` - the method descriptor to parse
  Returns:
    the method signature encoded by s
  Throws:
    `java.lang.ClassFormatError`

### parseType

    private static Type parseType(StringScanner scanner)
                           throws java.lang.ClassFormatError

  Parse a type from a given class-file field descriptor string.

  Parameters:
    `scanner` - the string scanner to parse from (modified to point to the next character after the parsed type)
  Returns:
    the type encoded by scanner
  Throws:
    `java.lang.ClassFormatError`

### parseReturn

    private static Type parseReturn(StringScanner scanner)
                             throws java.lang.ClassFormatError

  Parse a type from a given class-file return descriptor string.

  Parameters:
    `scanner` - the string scanner to parse from (modified to point to the next character after the parsed type)
  Returns:
    the type encoded by scanner
  Throws:
    `java.lang.ClassFormatError`

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ESC/Java2 © 2003,2004,2005 David Cok and Joseph Kiniry © 2005 UCD Dublin © 2003,2004 Radboud University Nijmegen © 1999,2000 Compaq Computer Corporation © 1997,1998,1999 Digital Equipment Corporation All Rights Reserved
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

The ESC/Java2 Project Homepage