@Override public boolean add(Entry entry) { String name = entry.getName(); if (entry instanceof ClassEntry) name+="$"; else if (!(entry instanceof PackageEntry)) throw new IllegalArgumentException(entry.toString()); else if (".".equals(name)) name=""; if (_entries.get(name)!=null) return false; return _entries.put(name,entry); }
protected boolean add(Entry entry) { if (_entries.containsKey(entry.getPattern())) return false; _entries.put(entry.getPattern(),entry); if (entry instanceof LocationEntry || entry instanceof ModuleEntry) { if (entry.isInclusive()) _locations.include(entry); else _locations.exclude(entry); } else { if (entry.isInclusive()) _patterns.include(entry); else _patterns.exclude(entry); } return true; }
/** * Create an entry object containing information about * a single classpath pattern * * @param pattern single classpath pattern * @return corresponding Entry object */ private Entry createEntry(String pattern) { Entry entry = null; if (pattern != null) { String item = pattern.trim(); if (item.length() > 0) { entry = new Entry(); entry.result = !item.startsWith("-"); entry.partial = item.endsWith("."); entry.classpath = entry.result ? item : item.substring(1).trim(); } } return entry; }
/** * Create an entry object containing information about * a single classpath pattern * * @param pattern single classpath pattern * @return corresponding Entry object */ private Entry createEntry(String pattern) { Entry entry = null; if (pattern != null) { String item = pattern.trim(); if (item.length() > 0) { entry = new Entry(); entry.result = !item.startsWith("-"); entry.partial = item.endsWith("."); entry.classpath = entry.result ? item : item.substring(1).trim(); } } return entry; }
/** * Create an entry object containing information about * a single classpath pattern * * @param pattern single classpath pattern * @return corresponding Entry object */ private Entry createEntry(String pattern) { Entry entry = null; if (pattern != null) { String item = pattern.trim(); if (item.length() > 0) { entry = new Entry(); entry.result = !item.startsWith("-"); entry.partial = item.endsWith("."); entry.classpath = entry.result ? item : item.substring(1).trim(); } } return entry; }
/** * Create an entry object containing information about * a single classpath pattern * * @param pattern single classpath pattern * @return corresponding Entry object */ private Entry createEntry(String pattern) { Entry entry = null; if (pattern != null) { String item = pattern.trim(); if (item.length() > 0) { entry = new Entry(); entry.result = !item.startsWith("-"); entry.partial = item.endsWith("."); entry.classpath = entry.result ? item : item.substring(1).trim(); } } return entry; }
/** * Create an entry object containing information about * a single classpath pattern * * @param pattern single classpath pattern * @return corresponding Entry object */ private Entry createEntry(String pattern) { Entry entry = null; if (pattern != null) { String item = pattern.trim(); if (item.length() > 0) { entry = new Entry(); entry.result = !item.startsWith("-"); entry.partial = item.endsWith("."); entry.classpath = entry.result ? item : item.substring(1).trim(); } } return entry; }
protected boolean add(Entry entry) { if (_entries.containsKey(entry.getPattern())) return false; _entries.put(entry.getPattern(),entry); if (entry instanceof LocationEntry || entry instanceof ModuleEntry) { if (entry.isInclusive()) _locations.include(entry); else _locations.exclude(entry); } else { if (entry.isInclusive()) _patterns.include(entry); else _patterns.exclude(entry); } return true; }
@Override public boolean add(Entry entry) { if (entry instanceof LocationEntry) return _byLocation.add(entry); if (entry instanceof ModuleEntry) return _byModule.add(entry); throw new IllegalArgumentException(entry.toString()); }
@Override public boolean add(Entry entry) { if (!(entry instanceof ModuleEntry)) throw new IllegalArgumentException(entry.toString()); String module = ((ModuleEntry)entry).getModule(); if (_entries.get(module)!=null) return false; _entries.put(module,entry); return true; }
@Override public boolean remove(Object entry) { if (!(entry instanceof Entry)) return false; return _entries.remove(((Entry)entry).getName())!=null; } }
@Override public boolean remove(Object entry) { if (!(entry instanceof Entry)) return false; return _entries.remove(((Entry)entry).getName())!=null; } }
@Override public boolean add(Entry entry) { String name = entry.getName(); if (entry instanceof ClassEntry) name+="$"; else if (!(entry instanceof PackageEntry)) throw new IllegalArgumentException(entry.toString()); else if (".".equals(name)) name=""; if (_entries.get(name)!=null) return false; return _entries.put(name,entry); }
@Override public boolean remove(Object entry) { if (!(entry instanceof Entry)) return false; return _entries.remove(((Entry)entry).getName())!=null; }
@Override public boolean remove(Object entry) { if (!(entry instanceof Entry)) return false; return _entries.remove(((Entry)entry).getName())!=null; } }
@Override public boolean remove(Object entry) { if (!(entry instanceof Entry)) return false; return _entries.remove(((Entry)entry).getName())!=null; }
@Override public boolean add(Entry entry) { if (entry instanceof LocationEntry) return _byLocation.add(entry); if (entry instanceof ModuleEntry) return _byModule.add(entry); throw new IllegalArgumentException(entry.toString()); }
@Override public boolean remove(Object entry) { if (!(entry instanceof Entry)) return false; return _entries.remove(((Entry)entry).getName())!=null; } }