@Test public void testIsCompatibleWithWithACompatibleType() { assertTrue("isCompatibleWith() is broken.", argDesc.isCompatibleWith(Long.class)); }
public boolean isCompatibleWith(final Class type) { for (final Class compatibleType : argType.getCompatibleTypes()) { if (type == compatibleType) return true; if (List.class.equals(compatibleType) && List.class.isAssignableFrom(type)) return true; } return false; }
ArgDescriptor { public boolean isCompatibleWith(final Class type) { for (final Class compatibleType : argType.getCompatibleTypes()) { if (type == compatibleType) return true; if (List.class.equals(compatibleType) && List.class.isAssignableFrom(type)) return true; } return false; } }
ArgDescriptor { public boolean isCompatibleWith(final Class type) { for (final Class compatibleType : argType.getCompatibleTypes()) { if (type == compatibleType) return true; if (List.class.equals(compatibleType) && List.class.isAssignableFrom(type)) return true; } return false; } ArgDescriptor(final ArgType argType, final String argName, final String description); }
ArgDescriptor { public boolean isCompatibleWith(final Class type) { for (final Class compatibleType : argType.getCompatibleTypes()) { if (type == compatibleType) return true; if (List.class.equals(compatibleType) && List.class.isAssignableFrom(type)) return true; } return false; } ArgDescriptor(final ArgType argType, final String argName, final String description); ArgType getArgType(); String getArgName(); String getDescription(); boolean isOptional(); boolean isCompatibleWith(final Class type); boolean isCompatibleList(final Class listElementType); Class[] getCompatibleTypes(); boolean acceptsMultipleArgs(); }
ArgDescriptor { public boolean isCompatibleWith(final Class type) { for (final Class compatibleType : argType.getCompatibleTypes()) { if (type == compatibleType) return true; if (List.class.equals(compatibleType) && List.class.isAssignableFrom(type)) return true; } return false; } ArgDescriptor(final ArgType argType, final String argName, final String description); ArgType getArgType(); String getArgName(); String getDescription(); boolean isOptional(); boolean isCompatibleWith(final Class type); boolean isCompatibleList(final Class listElementType); Class[] getCompatibleTypes(); boolean acceptsMultipleArgs();  }