Type { public boolean isShort() { return equals(SHORT); } Type(@Nonnull final Package pkg, @Nonnull final String name, @Nonnull final GenericDeclaration genericDeclaration);  Type(@Nonnull final String qualifiedName);  Type(@Nonnull final String packageName, @Nonnull final String typeName, @Nonnull final String genericDeclaration); @Nullable static Type evaluateJavaLangType(@Nonnull final String name); @Nonnull static Type of(@Nonnull final Class<?> clazz); @Override boolean equals(final Object obj); @Nonnull GenericDeclaration getGenericDeclaration(); @Nonnull String getName(); @Nonnull Package getPackage(); @Override int hashCode(); boolean isBoolean(); boolean isBoxedBoolean(); boolean isBoxedByte(); boolean isBoxedCharacter(); boolean isBoxedDouble(); boolean isBoxedFloat(); boolean isBoxedInteger(); boolean isBoxedLong(); boolean isBoxedShort(); boolean isBoxedType(); boolean isByte(); boolean isChar(); boolean isCollectionVariant(); boolean isDouble(); boolean isFloat(); boolean isInt(); boolean isJavaLangType(); boolean isLong(); boolean isNumber(); boolean isPrimitive(); boolean isShort(); boolean isString(); @Override String toString(); static final Type BOOLEAN; static final Type BOOLEAN_BOXED; static final Type BYTE; static final Type BYTE_BOXED; static final Type CHAR; static final Type CHARACTER_BOXED; static final Type DOUBLE; static final Type DOUBLE_BOXED; static final Type FLOAT; static final Type FLOAT_BOXED; static final Type INT; static final Type INTEGER_BOXED; static final Type LONG; static final Type LONG_BOXED; static final Type NUMBER; static final Type SHORT; static final Type SHORT_BOXED; static final Type STRING; static final List<Type> JAVA_LANG_VALUE_TYPES; }
@Test public void isShort() { assertTrue(new Type("short").isShort()); assertFalse(new Type("Short").isShort()); assertFalse(new Type("int").isShort()); assertFalse(new Type("Long").isShort()); }