/** * Returns whether the given annotation type is mapped to <code>true</code> * in the given <code>allowed</code> map or covered by the <code>configured</code> * set. * * @param annotationType the annotation type * @param allowed the map with allowed annotation types mapped to booleans * @param configured the set with configured annotation types * @return <code>true</code> if annotation is contained, <code>false</code> * otherwise * @since 3.0 */ private boolean contains(Object annotationType, Map<Object, Boolean> allowed, Set<Object> configured) { boolean covered; synchronized (fRunnableLock){ Boolean cached= allowed.get(annotationType); if (cached != null) return cached.booleanValue(); covered = isCovered(annotationType, configured); allowed.put(annotationType, covered ? Boolean.TRUE : Boolean.FALSE); } return covered; }
/** * Returns whether the given annotation type is mapped to <code>true</code> * in the given <code>allowed</code> map or covered by the <code>configured</code> * set. * * @param annotationType the annotation type * @param allowed the map with allowed annotation types mapped to booleans * @param configured the set with configured annotation types * @return <code>true</code> if annotation is contained, <code>false</code> * otherwise * @since 3.0 */ private boolean contains(Object annotationType, Map<Object, Boolean> allowed, Set<Object> configured) { boolean covered; synchronized (fRunnableLock){ Boolean cached= allowed.get(annotationType); if (cached != null) return cached.booleanValue(); covered = isCovered(annotationType, configured); allowed.put(annotationType, covered ? Boolean.TRUE : Boolean.FALSE); } return covered; }