TV-Browser 2.7.5 API

util.paramhandler
Class ParamParser

java.lang.Object
  extended by util.paramhandler.ParamParser

public class ParamParser
extends Object

The ParamParser analyses a String and calls a ParamLibrary for each Key/Function it finds. This System is easily extendable. For an example look into the CapturePlugin-Code

Author:
bodum

Constructor Summary
ParamParser()
          Create a ParamParser with the default ParamLibrary
ParamParser(ParamLibrary lib)
          Create a ParamParser with a specific Library
 
Method Summary
 String analyse(String command, Program prg)
          Analyse a String and return the parsed String.
 String getErrorString()
          The Error-String for Details aobut an Error
 ParamLibrary getParamLibrary()
          The used ParamLibrary
 boolean hasErrors()
          Returns True if an error occured
 void setParamLibrary(ParamLibrary lib)
          Set the ParamLibrary that this Parser uses
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ParamParser

public ParamParser()
Create a ParamParser with the default ParamLibrary


ParamParser

public ParamParser(ParamLibrary lib)
Create a ParamParser with a specific Library

Parameters:
lib - ParamLibrary to use
Method Detail

hasErrors

public boolean hasErrors()
Returns True if an error occured

Returns:
True if Error

getErrorString

public String getErrorString()
The Error-String for Details aobut an Error

Returns:
Error-String

getParamLibrary

public ParamLibrary getParamLibrary()
The used ParamLibrary

Returns:
ParamLibrary used in this Parser

setParamLibrary

public void setParamLibrary(ParamLibrary lib)
Set the ParamLibrary that this Parser uses

Parameters:
lib - ParamLibrary to use

analyse

public String analyse(String command,
                      Program prg)
Analyse a String and return the parsed String. If an error occured, the Return-Value is null.

Parameters:
command - String to parse
prg - Program to use while parsing
Returns:
parsed String, null if an error occured

TV-Browser 2.7.5 API

TV-Browser 2.7.5, Copyright (C) 04-2003 Martin Oberhauser (martin@tvbrowser.org)