All Downloads are FREE. Search and download functionalities are using the official Maven repository.

org.jgroups.conf.PropertyConverter Maven / Gradle / Ivy

Go to download

This artifact provides a single jar that contains all classes required to use remote EJB and JMS, including all dependencies. It is intended for use by those not using maven, maven users should just import the EJB and JMS BOM's instead (shaded JAR's cause lots of problems with maven, as it is very easy to inadvertently end up with different versions on classes on the class path).

There is a newer version: 34.0.0.Final
Show newest version
package org.jgroups.conf;

import org.jgroups.annotations.Property;
import org.jgroups.util.StackType;

/**
 * Represents a property converter that takes an input from corresponding field
 * in JGroups properties file as a String and converts it to a matching Java
 * type.
 * 
 * @see PropertyConverters
 * @see Property
 * 
 * @author Vladimir Blagojevic
 */
public interface PropertyConverter {
    Object convert(Object obj, Class propertyFieldType, String propertyName, String propertyValue,
                   boolean check_scope, StackType ip_version) throws Exception;

    /**
     * Converts the value to a string. The default is to simply invoke Object.toString(), however, some objects need
     * to be printed specially, e.g. a long array etc.
     * @param value
     * @return
     */
    String toString(Object value);
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy