public void setType ( final Class < ? > type ) throws DevFailed { if ( Enum . class . isAssignableFrom ( type ) ) { this . type = AttributeTangoType . getTypeFromClass ( type ) . getType ( ) ; } else { this . type = type ; } enumType = AttributeTangoType . getTypeFromClass ( type ) ; tangoType = enumType . getTangoIDLType ( ) ; if ( type . isArray ( ) ) { if ( type . getComponentType ( ) . isArray ( ) ) { format = AttrDataFormat . IMAGE ; } else { format = AttrDataFormat . SPECTRUM ; maxY = 0 ; } } else { format = AttrDataFormat . SCALAR ; maxX = 1 ; maxY = 0 ; } }
Set the attribute type with Java class . Can be scalar array or matrix