net.sf.jagg
Class PropertyParser

java.lang.Object
  extended by net.sf.jagg.PropertyParser

public class PropertyParser
extends java.lang.Object

This class knows how to parse a property specification: property[([param[, param]*])].

Since:
0.1.0
Author:
Randy Gettman

Constructor Summary
PropertyParser()
          Create a PropertyParser.
PropertyParser(java.lang.String propertyText)
          Create a PropertyParser object that will parse the given property text.
 
Method Summary
 java.util.List<java.lang.Object> getParameters()
          Returns the List of parameters (possibly empty), or null if this is a simple property name.
 java.lang.String getPropertyName()
          Returns the property or method name.
 boolean isMethod()
          Returns whether this property text represents a method (with parentheses) or a simple property name (without parentheses).
 void parse()
          Parses the property text.
 void setPropertyText(java.lang.String propertyText)
          Sets the property to the given property text and resets the parser.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PropertyParser

public PropertyParser()
Create a PropertyParser.


PropertyParser

public PropertyParser(java.lang.String propertyText)
Create a PropertyParser object that will parse the given property text.

Parameters:
propertyText - The text of the property.
Method Detail

setPropertyText

public void setPropertyText(java.lang.String propertyText)
Sets the property to the given property text and resets the parser.

Parameters:
propertyText - The new property text.

parse

public void parse()
Parses the property text.


getPropertyName

public java.lang.String getPropertyName()
Returns the property or method name.

Returns:
The property or method name.

isMethod

public boolean isMethod()
Returns whether this property text represents a method (with parentheses) or a simple property name (without parentheses).

Returns:
true if it represents a method, false if it represents a simple property name.

getParameters

public java.util.List<java.lang.Object> getParameters()
Returns the List of parameters (possibly empty), or null if this is a simple property name.

Returns:
A List of parameters (possibly empty), or null if this is a simple property name.


Copyright © 2010-2013 jAgg Team. All Rights Reserved.