Klasse EnablerConverter

java.lang.Object
net.sf.jguiraffe.gui.builder.enablers.EnablerConverter
Alle implementierten Schnittstellen:
org.apache.commons.beanutils.Converter

public class EnablerConverter extends Object implements org.apache.commons.beanutils.Converter

A specialized converter implementation for ElementEnabler objects.

This converter class is a thin wrapper around the EnablerBuilder class. In its convert(Class, Object) method it expects a string representation of an ElementEnabler which is compatible with the specifications understood by the builder. It passes this string to the builder and uses it to create the enabler. The resulting ElementEnabler is returned.

Implementation note: This class is stateless; therefore an instance can be shared between multiple components and invoked concurrently.

Version:
$Id: EnablerConverter.java 205 2012-01-29 18:29:57Z oheger $
Autor:
Oliver Heger
  • Konstruktordetails

    • EnablerConverter

      public EnablerConverter()
  • Methodendetails

    • convert

      public Object convert(Class type, Object value)
      Performs the type conversion. This implementation uses EnablerBuilder to create an ElementEnabler implementation from the string representation of the passed in object. For null values, or if the conversion fails, a ConversionException is thrown.
      Angegeben von:
      convert in Schnittstelle org.apache.commons.beanutils.Converter
      Parameter:
      type - the target class of the conversion
      value - the object to be converted
      Gibt zurück:
      the converted object
      Löst aus:
      org.apache.commons.beanutils.ConversionException - if conversion is not possible