src/main/java/org/tinyradius/attribute/RadiusAttribute.java
public static RadiusAttribute createRadiusAttribute(Dictionary dictionary, int vendorId, int attributeType) {
        RadiusAttribute attribute = new RadiusAttribute();

        AttributeType at = dictionary.getAttributeTypeByCode(vendorId, attributeType);
        if (at != null && at.getAttributeClass() != null) {
            try {
                attribute = at.getAttributeClass().newInstance();
            }
            catch (Exception e) {
                // error instantiating class - should not occur
            }
        }

        attribute.setAttributeType(attributeType);
        attribute.setDictionary(dictionary);
        attribute.setVendorId(vendorId);
        return attribute;
    }
/**
     * Creates a RadiusAttribute object of the appropriate type.
     *
     * @param dictionary    Dictionary to use
     * @param vendorId      vendor ID or -1
     * @param attributeType attribute type
     * @return RadiusAttribute object
     */
Creates a RadiusAttribute object of the appropriate type.

@param dictionary    Dictionary to use
@param vendorId      vendor ID or -1
@param attributeType attribute type
@return RadiusAttribute object
Creates a RadiusAttribute object of the appropriate type . @param dictionary Dictionary to use @param vendorId vendor ID or - 1 @param attributeType attribute type @return RadiusAttribute object
public static RadiusAttribute createRadiusAttribute(Dictionary dictionary, int vendorId, int attributeType) {
        RadiusAttribute attribute = new RadiusAttribute();
        AttributeType at = dictionary.getAttributeTypeByCode(vendorId, attributeType);
        if (at != null && at.getAttributeClass() != null) {
            try {
                attribute = at.getAttributeClass().newInstance();
            }
            catch (Exception e) {
            }
        }
        attribute.setAttributeType(attributeType);
        attribute.setDictionary(dictionary);
        attribute.setVendorId(vendorId);
        return attribute;
    }
public static RadiusAttribute createRadiusAttribute ( Dictionary dictionary , int vendorId , int attributeType ) { RadiusAttribute attribute = new RadiusAttribute ( ) ; AttributeType at = dictionary . getAttributeTypeByCode ( vendorId , attributeType ) ; if ( at != null && at . getAttributeClass ( ) != null ) { try { attribute = at . getAttributeClass ( ) . newInstance ( ) ; } catch ( Exception e ) { } } attribute . setAttributeType ( attributeType ) ; attribute . setDictionary ( dictionary ) ; attribute . setVendorId ( vendorId ) ; return attribute ; }
Creates a RadiusAttribute object of the appropriate type.
Creates a RadiusAttribute object of the appropriate type .
// error instantiating class - should not occur
