@Test public void shouldSelectPrivateFields() { assertEquals(1, AttributeCompressionStrategy.getAllValidFields(PrivateFieldTest.class).size()); }
public static Collection<Field> getAllValidFields(Class c) { List<Field> r = new ArrayList<Field>(); for (Field f : c.getDeclaredFields()) { int modifiers = f.getModifiers(); if (Modifier.isStatic(modifiers)) continue; if (Modifier.isVolatile(modifiers)) continue; if (Modifier.isTransient(modifiers)) continue; r.add(f); } return r; }
AttributeCompressionStrategy implements BlobStrategy { public static Collection<Field> getAllValidFields(Class c) { List<Field> r = new ArrayList<Field>(); for (Field f : c.getDeclaredFields()) { int modifiers = f.getModifiers(); if (Modifier.isStatic(modifiers)) continue; if (Modifier.isVolatile(modifiers)) continue; if (Modifier.isTransient(modifiers)) continue; r.add(f); } return r; } }
AttributeCompressionStrategy implements BlobStrategy { public static Collection<Field> getAllValidFields(Class c) { List<Field> r = new ArrayList<Field>(); for (Field f : c.getDeclaredFields()) { int modifiers = f.getModifiers(); if (Modifier.isStatic(modifiers)) continue; if (Modifier.isVolatile(modifiers)) continue; if (Modifier.isTransient(modifiers)) continue; r.add(f); } return r; } @Inject  AttributeCompressionStrategy(TokenBlobUtils blobUtils); }
AttributeCompressionStrategy implements BlobStrategy { public static Collection<Field> getAllValidFields(Class c) { List<Field> r = new ArrayList<Field>(); for (Field f : c.getDeclaredFields()) { int modifiers = f.getModifiers(); if (Modifier.isStatic(modifiers)) continue; if (Modifier.isVolatile(modifiers)) continue; if (Modifier.isTransient(modifiers)) continue; r.add(f); } return r; } @Inject  AttributeCompressionStrategy(TokenBlobUtils blobUtils); void perform(Token token); void reverse(Token token); static String getInitials(String name); static Collection<Field> getAllValidFields(Class c); }
AttributeCompressionStrategy implements BlobStrategy { public static Collection<Field> getAllValidFields(Class c) { List<Field> r = new ArrayList<Field>(); for (Field f : c.getDeclaredFields()) { int modifiers = f.getModifiers(); if (Modifier.isStatic(modifiers)) continue; if (Modifier.isVolatile(modifiers)) continue; if (Modifier.isTransient(modifiers)) continue; r.add(f); } return r; } @Inject  AttributeCompressionStrategy(TokenBlobUtils blobUtils); void perform(Token token); void reverse(Token token); static String getInitials(String name); static Collection<Field> getAllValidFields(Class c);  }