Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.makumba.providers.datadefinition.makumba
Class FieldCursor

    java.lang.Object
      org.makumba.providers.datadefinition.makumba.FieldCursor

    public class FieldCursor

extends Object

This is the field definition tokenizer. The lookup metods return false or null if the respective token has not been encountered. The expect methods throw a DataDefinitionParseError instead. Some lookup methods simply do lookupLetters for now, they can be refined later (e.g. letter followed by letters or digits, etc).

Field Summary
`(package private) int` | `index`
`(package private) RecordParser` | `rp`
`(package private) String` | `toParse`

Constructor Summary
`FieldCursor(RecordParser rp, String definition)`

Method Summary
`void` | `expect(String s)` expect the string to follow
`(package private) void` | `expectCharEnum(FieldInfo fi)`
`String` | `expectEnumName()`
`Integer` | `expectInteger()`
`(package private) void` | `expectIntEnum(FieldInfo fi)`
`String` | `expectTypeLiteral()`
`void` | `expectWhitespace()` expect the whitespace
`DataDefinitionParseError` | `fail(String reason)`
`boolean` | `lookup(String s)` check if the respective string follows, maybe after some spaces
`String` | `lookupDescription()`
`String` | `lookupEnumName()` an enumerator name
`(package private) String` | `lookupIdentifier()`
`Integer` | `lookupInteger()`
`String` | `lookupLetters()` a group of letters
`String` | `lookupTableName()` a table name
`(package private) DataDefinition` | `lookupTableSpecifier()` looks for a table specifier in the form tablename
`String` | `lookupTypeLiteral()` a type name
`(package private) void` | `skipBlank()`
`void` | `substitute(int l, String s)`
`(package private) String` | `upTo(int end)`
`(package private) String` | `upToExpect(String s)`

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

Field Detail

### toParse

    String toParse

### index

    int index

### rp

    RecordParser rp

Constructor Detail

### FieldCursor

    public FieldCursor(RecordParser rp,
                       String definition)

Method Detail

### fail

    public DataDefinitionParseError fail(String reason)

### skipBlank

    void skipBlank()

### lookup

    public boolean lookup(String s)

  check if the respective string follows, maybe after some spaces

### expect

    public void expect(String s)
                throws DataDefinitionParseError

  expect the string to follow

  Throws:
    `DataDefinitionParseError`

### expectWhitespace

    public void expectWhitespace()
                          throws DataDefinitionParseError

  expect the whitespace

  Throws:
    `DataDefinitionParseError`

### lookupTypeLiteral

    public String lookupTypeLiteral()

  a type name

### expectTypeLiteral

    public String expectTypeLiteral()
                             throws DataDefinitionParseError

  Throws:
    `DataDefinitionParseError`

### lookupEnumName

    public String lookupEnumName()
                          throws DataDefinitionParseError

  an enumerator name

  Throws:
    `DataDefinitionParseError`

### expectEnumName

    public String expectEnumName()
                          throws DataDefinitionParseError

  Throws:
    `DataDefinitionParseError`

### lookupTableName

    public String lookupTableName()
                           throws DataDefinitionParseError

  a table name

  Throws:
    `DataDefinitionParseError`

### lookupLetters

    public String lookupLetters()

  a group of letters

### lookupInteger

    public Integer lookupInteger()

### expectInteger

    public Integer expectInteger()
                          throws DataDefinitionParseError

  Throws:
    `DataDefinitionParseError`

### lookupIdentifier

    String lookupIdentifier()

### upToExpect

    String upToExpect(String s)
                throws DataDefinitionParseError

  Throws:
    `DataDefinitionParseError`

### lookupTableSpecifier

    DataDefinition lookupTableSpecifier()
                                  throws DataDefinitionParseError

  looks for a table specifier in the form tablename

  Throws:
    `DataDefinitionParseError`

### expectCharEnum

    void expectCharEnum(FieldInfo fi)
                  throws DataDefinitionParseError

  Throws:
    `DataDefinitionParseError`

### expectIntEnum

    void expectIntEnum(FieldInfo fi)
                 throws DataDefinitionParseError

  Throws:
    `DataDefinitionParseError`

### lookupDescription

    public String lookupDescription()
                             throws DataDefinitionParseError

  Throws:
    `DataDefinitionParseError`

### upTo

    String upTo(int end)

### substitute

    public void substitute(int l,
                           String s)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Docs generated on 2009-02-25 14:20