AttributeMethodExtractor { public static Map<String, Method> setters(Class<? extends AnnotatedFileAttributeView> type) { return find(type, Extractor.SETTER); } private  AttributeMethodExtractor(); static Map<String, Method> getters(Class<? extends AnnotatedFileAttributes> type); static Map<String, Method> setters(Class<? extends AnnotatedFileAttributeView> type);  }
@Test public void discoversDeclaredSetters() { Map<String, Method> attrs = AttributeMethodExtractor.setters( AnnotatedDosFileAttributeView.class); assertHasAttribute(attrs, "readonly"); assertHasAttribute(attrs, "system"); assertHasAttribute(attrs, "archive"); assertHasAttribute(attrs, "hidden"); }
@Test public void discoversInheritedSetters() { Map<String, Method> attrs = AttributeMethodExtractor.setters( AnnotatedDosFileAttributeView.class); assertHasAttribute(attrs, "lastModifiedTime"); assertHasAttribute(attrs, "lastAccessTime"); assertHasAttribute(attrs, "creationTime"); }