Imports { public static Imports allOf(@Nonnull final Clazz clazz) { Check.notNull(clazz, "clazz"); final List<Import> imports = Lists.newArrayList(); imports.addAll(ofAnnotations(clazz.getAnnotations()).asList()); imports.addAll(ofConstructors(clazz.getConstructors()).asList()); imports.addAll(ofFields(clazz.getFields()).asList()); imports.addAll(ofInterfaces(clazz.getInterfaces()).asList()); imports.addAll(ofMethods(clazz.getMethods()).asList()); return new Imports(imports); } private  Imports(final Iterable<Import> imports); static Imports allOf(@Nonnull final Clazz clazz); static Imports allOf(@Nonnull final Field field); static Imports allOf(@Nonnull final Method method); static Imports copyOf(final Iterable<Import> imports); static Imports of(final Import... imports); static Imports of(final Iterable<Import> imports); @Nonnull List<Import> asList(); @Nonnull Imports copyAndAdd(final Collection<Import> imports); @Nonnull Imports copyAndAdd(final Imports imports); @Nonnull Imports filter(); @Nullable Import find(@Nonnull final String typeName); @Nonnull Imports sortByName();  }
@Test(expected = IllegalNullArgumentException.class) public void allOf_clazz_isNull() { Imports.allOf((Clazz) null); }
@Test(expected = IllegalNullArgumentException.class) public void allOf_field_isNull() { Imports.allOf((Field) null); }