AttributeMethodExtractor { public static Map<String, Method> getters(Class<? extends AnnotatedFileAttributes> type) { return find(type, Extractor.GETTER); } private  AttributeMethodExtractor(); static Map<String, Method> getters(Class<? extends AnnotatedFileAttributes> type); static Map<String, Method> setters(Class<? extends AnnotatedFileAttributeView> type);  }
@Test public void discoversDeclaredGetters() { Map<String, Method> attrs = AttributeMethodExtractor.getters( AnnotatedPosixFileAttributes.class); assertHasAttribute(attrs, "owner"); assertHasAttribute(attrs, "group"); assertHasAttribute(attrs, "permissions"); }
@Test public void discoversInheritedGetters() { Map<String, Method> attrs = AttributeMethodExtractor.getters( AnnotatedPosixFileAttributes.class); assertHasAttribute(attrs, "lastModifiedTime"); assertHasAttribute(attrs, "lastAccessTime"); assertHasAttribute(attrs, "creationTime"); assertHasAttribute(attrs, "isRegularFile"); assertHasAttribute(attrs, "isDirectory"); assertHasAttribute(attrs, "isSymbolicLink"); assertHasAttribute(attrs, "isOther"); assertHasAttribute(attrs, "size"); assertHasAttribute(attrs, "fileKey"); }