Community
Participate
Working Groups
if(outputContainers[i].equals(sourceContainers[j])){
return true;
}
return false;
// doesn't implement A, then the isInstance call will return false.
//
// So, instead of using Class.isInstance, do the checking myself.
final String filterClassName = filterClass.getName();
for (Class cl = objectClass; cl != null; cl = cl.getSuperclass()) {
if (cl.getName().equals(filterClass.getName())) {
if (cl.getName().equals(filterClassName))return true;
Class[] clInterfaces = cl.getInterfaces();
for (int i = 0; i < clInterfaces.length; i++) {
if (clInterfaces[i].getName().equals(filterClass.getName())) {
if (clInterfaces[i].getName().equals(filterClassName))return true;
if (isInstance(clInterfaces[i], filterClass))return true;
return isInstance(clInterfaces[i], filterClass);
* Map validator id's to Integers. The integers correspond to bits in the ValProperty instances.
*/
private final Map<String, Integer> _map = new HashMap<String, Integer>(100);
private final Map<Integer, String> _reverseMap = new HashMap<Integer, String>(100);
/** Next available bit. */
private int _next;
i = _next++;
_map.put(id, i);
_reverseMap.put(i, id);
return i;
/**
* Answer the validator id for the index.
* @param index
* @return null if the index number has not been set.
public synchronized String getId(Integer index){
return _reverseMap.get(index);
public synchronized void reset(){
_map.clear();
_reverseMap.clear();
_next = 0;
* Answer the ids for the bit in the bitset. This is used for debugging.
* @param bs
public synchronized String[] getIds(BitSet bs){
List<String> list = new LinkedList<String>();
for(int i=bs.nextSetBit(0); i>=0; i=bs.nextSetBit(i+1)) {
String id = getId(i);
if (id != null)list.add(id);
String[] s = new String[list.size()];
return list.toArray(s);
@Override
public Boolean matchesResource(IResource resource, ContentTypeWrapper wrapper) {
String name = PortableFileDelim + resource.getProjectRelativePath().toPortableString();
if (name == null)return Boolean.FALSE;
return _compiledPattern.matcher(name).matches();