Representation( String type ) { this.type = new RepresentationType( type ); }
public final void addNumber( Number value ) { if ( value instanceof Double || value instanceof Float ) { writer.writeFloatingPointNumber( RepresentationType.valueOf( value.getClass() ), value.doubleValue() ); } else { checkThatItIsBuiltInType( value ); writer.writeInteger( RepresentationType.valueOf( value.getClass() ), value.longValue() ); } } }
ParameterRepresentation( String name, Class<?> type, boolean optional, String description, boolean list ) { super( RepresentationType.PLUGIN_PARAMETER ); this.name = name; this.optional = optional; this.list = list; this.paramType = RepresentationType.extended( type ); this.description = description; }
final void putNumber( String key, Number value ) { if ( value instanceof Double || value instanceof Float ) { writer.writeFloatingPointNumber( RepresentationType.valueOf( value.getClass() ), key, value.doubleValue() ); } else { checkThatItIsBuiltInType( value ); writer.writeInteger( RepresentationType.valueOf( value.getClass() ), key, value.longValue() ); } } }
Representation( String type ) { this.type = new RepresentationType( type ); }
public ExtensionPointRepresentation( String name, Class<?> extended, String description ) { super( RepresentationType.PLUGIN_DESCRIPTION ); this.name = name; this.description = description; this.extended = RepresentationType.extended( extended ); }
public final void addNumber( Number value ) { if ( value instanceof Double || value instanceof Float ) { writer.writeFloatingPointNumber( RepresentationType.valueOf( value.getClass() ), value.doubleValue() ); } else { if ( !"java.lang".equals( value.getClass().getPackage().getName() ) ) { throw new IllegalArgumentException( "Unsupported number type: " + value.getClass() ); } writer.writeInteger( RepresentationType.valueOf( value.getClass() ), value.longValue() ); } } }
Representation( String type ) { this.type = new RepresentationType( type ); }
ParameterRepresentation( String name, Class<?> type, boolean optional, String description, boolean list ) { super( RepresentationType.PLUGIN_PARAMETER ); this.name = name; this.optional = optional; this.list = list; this.paramType = RepresentationType.extended( type ); this.description = description; }
public final void addNumber( Number value ) { if ( value instanceof Double || value instanceof Float ) { writer.writeFloatingPointNumber( RepresentationType.valueOf( value.getClass() ), value.doubleValue() ); } else { checkThatItIsBuiltInType( value ); writer.writeInteger( RepresentationType.valueOf( value.getClass() ), value.longValue() ); } } }
public ExtensionPointRepresentation( String name, Class<?> extended, String description ) { super( RepresentationType.PLUGIN_DESCRIPTION ); this.name = name; this.description = description; this.extended = RepresentationType.extended( extended ); }
public final void putNumber( String key, Number value ) { if ( value instanceof Double || value instanceof Float ) { writer.writeFloatingPointNumber( RepresentationType.valueOf( value.getClass() ), key, value.doubleValue() ); } else { if ( !"java.lang".equals( value.getClass().getPackage().getName() ) ) { throw new IllegalArgumentException( "Unsupported number type: " + value.getClass() ); } writer.writeInteger( RepresentationType.valueOf( value.getClass() ), key, value.longValue() ); } } }
final void putNumber( String key, Number value ) { if ( value instanceof Double || value instanceof Float ) { writer.writeFloatingPointNumber( RepresentationType.valueOf( value.getClass() ), key, value.doubleValue() ); } else { checkThatItIsBuiltInType( value ); writer.writeInteger( RepresentationType.valueOf( value.getClass() ), key, value.longValue() ); } } }