org.mockito.cglib.core.Predicate Java Examples
The following examples show how to use
org.mockito.cglib.core.Predicate.
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: EntityDefinitionManager.java From Eagle with Apache License 2.0 | 5 votes |
private static Class<?> createDynamicClassForMetric(final String className, Map<String, Class<?>> dynamicFieldTypes){ BeanGenerator beanGenerator = new BeanGenerator(); beanGenerator.setNamingPolicy(new NamingPolicy(){ @Override public String getClassName(String prefix,String source, Object key, Predicate names){ return className; }}); BeanGenerator.addProperties(beanGenerator, dynamicFieldTypes); beanGenerator.setSuperclass(TaggedLogAPIEntity.class); return (Class<?>) beanGenerator.createClass(); }
Example #2
Source File: EntityDefinitionManager.java From eagle with Apache License 2.0 | 5 votes |
private static Class<?> createDynamicClassForMetric(final String className, Map<String, Class<?>> dynamicFieldTypes) { BeanGenerator beanGenerator = new BeanGenerator(); beanGenerator.setNamingPolicy(new NamingPolicy() { @Override public String getClassName(String prefix, String source, Object key, Predicate names) { return className; } }); BeanGenerator.addProperties(beanGenerator, dynamicFieldTypes); beanGenerator.setSuperclass(TaggedLogAPIEntity.class); return (Class<?>)beanGenerator.createClass(); }
Example #3
Source File: ClassImposterizer.java From astor with GNU General Public License v2.0 | 4 votes |
@Override public String getClassName(String prefix, String source, Object key, Predicate names) { return "codegen." + super.getClassName(prefix, source, key, names); }