This {@link Descriptor} creates a Short.
38394041424344454647484950515253
public ShortBinding() { super("short"); } protected AbstractDescriptor createDescriptor(String value, Element element, Parse parse) { ShortDescriptor shortDescriptor = new ShortDescriptor(); Short shortValue; try { shortValue = new Short(value); } catch (NumberFormatException e) { parse.addProblem(createValueExceptionMessage("'"+value+"' cannot be parsed to a short", element), element); return null; } shortDescriptor.setValue(shortValue); return shortDescriptor; }
484950515253545556575859606162
* @see WireParser */ public class ShortBinding extends BasicTypeBinding { protected AbstractDescriptor createDescriptor(String value) { ShortDescriptor shortDescriptor = new ShortDescriptor(); Short shortValue; try { shortValue = new Short(value); } catch (NumberFormatException e) { throw new NumberFormatException("'"+value+"' cannot be parsed to a short"); } shortDescriptor.setValue(shortValue); return shortDescriptor; }