@SuppressWarnings( "unchecked" ) public Class<T> load() { return (Class<T>) space.loadClass( name ); }
/** * Logs a warning message; uses "{}" format anchors. Pass {@link Throwable}s in last parameter for special handling. * * @param format The warning message format * @param arg1 First object to format * @param arg2 Second object to format */ public static void warn( final String format, final Object arg1, final Object arg2 ) { SINK.warn( format( format( format, arg1 ), arg2 ), arg2 instanceof Throwable ? (Throwable) arg2 : null ); }
public Enumeration<URL> findEntries( final String path, final String glob, final boolean recurse ) { return new ResourceEnumeration( path, glob, recurse, getClassPath() ); }
/** * Logs a debug message; uses "{}" format anchors. Pass {@link Throwable}s in last parameter for special handling. * * @param format The debug message format * @param arg1 First object to format * @param arg2 Second object to format */ public static void debug( final String format, final Object arg1, final Object arg2 ) { if ( DEBUG_ENABLED ) { SINK.debug( format( format( format, arg1 ), arg2 ), arg2 instanceof Throwable ? (Throwable) arg2 : null ); } }
/** * @return Temporary {@link Reference} for the given key; used in queries. */ static final Reference<?> tempKey( final Object key ) { return new Weak<Object>( key, null ); }
/** * @return {@link Collection} whose elements are kept alive with {@link SoftReference}s */ public static <T> Collection<T> elements() { return elements( 10 ); }
/** * @return {@link Map} whose keys are kept alive with {@link SoftReference}s */ public static <K, V> Map<K, V> keys() { return keys( 16 ); }
/** * @return {@link Map} whose values are kept alive with {@link WeakReference}s */ public static <K, V> Map<K, V> values() { return values( 16 ); }
public Requirement getRequirement( final BeanProperty<?> property ) { return property.getAnnotation( Requirement.class ); } }
public DeclaredMembers( final Class<?> clazz, final View... views ) { this.clazz = clazz; this.views = views.length == 0 ? View.values() : views; }
MemberIterator( final Class<?> clazz, final View[] views ) { this.clazz = filterClass( clazz ); this.views = views; }
/** * @return {@link ConcurrentMap} whose keys are kept alive with {@link SoftReference}s */ public static <K, V> ConcurrentMap<K, V> concurrentKeys() { return concurrentKeys( 16, 4 ); }
/** * @return {@link Map} whose values are kept alive with {@link SoftReference}s */ public static <K, V> Map<K, V> values() { return values( 16 ); }
/** * @return {@link ConcurrentMap} whose values are kept alive with {@link SoftReference}s */ public static <K, V> ConcurrentMap<K, V> concurrentValues() { return concurrentValues( 16, 4 ); }
/** * @return {@link ConcurrentMap} whose keys are kept alive with {@link WeakReference}s */ public static <K, V> ConcurrentMap<K, V> concurrentKeys() { return concurrentKeys( 16, 4 ); }
/** * @return Temporary {@link Reference} for the given value; used in queries. */ static final Reference<?> tempValue( final Object value ) { return new Weak<Object, Object>( null, value, null ); }