xdoclet.sdk.xgg
Class XGGPojo

java.lang.Object
  |
  +--xdoclet.sdk.xgg.XGGPojo
Direct Known Subclasses:
Condition, ConditionDescription, ConditionParameter, Deprecated, Level, Mandatory, Namespace, Option, Options, OptionSet, OptionSets, Parameter, Tag, Tags, Type, Unique, UsageDescription, Xdoclet, Xmldefault, Xmlname

public class XGGPojo
extends Object

Simple pojo (plain old java object) class that serves as a base class for XGG generated beans. This class contains logic to check that : - certain methods are supported for a certain version - value set matches with regular expression

Version:
$Revision: 1.6 $
Author:
Aslak Hellesøy, Laurent Etiemble

Constructor Summary
XGGPojo()
           
 
Method Summary
protected  void checkValue(String value, String pattern)
          Checks that the value match the pattern
protected  void checkVersion(String[] supportedVersions)
          Checks that the currently (static) version is among the supportedVersions.
static void setVersion(String version)
          Sets the version of the XGG POJO
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XGGPojo

public XGGPojo()
Method Detail

checkValue

protected final void checkValue(String value,
                                String pattern)
                         throws IllegalStateException
Checks that the value match the pattern

Parameters:
value - Value to check
pattern - Regular expression pattern
Throws:
IllegalStateException - If value doesn't match the pattern

checkVersion

protected final void checkVersion(String[] supportedVersions)
                           throws IllegalStateException
Checks that the currently (static) version is among the supportedVersions.

Parameters:
supportedVersions - supported versions
Throws:
IllegalStateException - if supportedVersions is not among the currently set version.
See Also:
setVersion(java.lang.String)

setVersion

public static final void setVersion(String version)
Sets the version of the XGG POJO

Parameters:
version - The new version


Copyright © 2000-2003 XDoclet Team. All Rights Reserved.