-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #346 from Ladicek/empty-stacked-index
Add empty and stacked indexes
- Loading branch information
Showing
8 changed files
with
1,002 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,93 @@ | ||
package org.jboss.jandex; | ||
|
||
import java.util.Collection; | ||
import java.util.Collections; | ||
import java.util.Set; | ||
|
||
/** | ||
* Immutable empty index; that is, an index that doesn't contain any class. All methods return either | ||
* an empty collection, or {@code null}. | ||
* | ||
* @since 3.2.0 | ||
*/ | ||
public final class EmptyIndex implements IndexView { | ||
public static final EmptyIndex INSTANCE = new EmptyIndex(); | ||
|
||
private EmptyIndex() { | ||
} | ||
|
||
@Override | ||
public Collection<ClassInfo> getKnownClasses() { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public ClassInfo getClassByName(DotName className) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Collection<ClassInfo> getKnownDirectSubclasses(DotName className) { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public Collection<ClassInfo> getAllKnownSubclasses(DotName className) { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public Collection<ClassInfo> getKnownDirectSubinterfaces(DotName interfaceName) { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public Collection<ClassInfo> getAllKnownSubinterfaces(DotName interfaceName) { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public Collection<ClassInfo> getKnownDirectImplementors(DotName interfaceName) { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public Collection<ClassInfo> getAllKnownImplementors(DotName interfaceName) { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public Collection<AnnotationInstance> getAnnotations(DotName annotationName) { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public Collection<AnnotationInstance> getAnnotationsWithRepeatable(DotName annotationName, IndexView index) { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public Collection<ModuleInfo> getKnownModules() { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public ModuleInfo getModuleByName(DotName moduleName) { | ||
return null; | ||
} | ||
|
||
@Override | ||
public Collection<ClassInfo> getKnownUsers(DotName className) { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public Collection<ClassInfo> getClassesInPackage(DotName packageName) { | ||
return Collections.emptySet(); | ||
} | ||
|
||
@Override | ||
public Set<DotName> getSubpackages(DotName packageName) { | ||
return Collections.emptySet(); | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.