id int32 0 165k | repo stringlengths 7 58 | path stringlengths 12 218 | func_name stringlengths 3 140 | original_string stringlengths 73 34.1k | language stringclasses 1
value | code stringlengths 73 34.1k | code_tokens list | docstring stringlengths 3 16k | docstring_tokens list | sha stringlengths 40 40 | url stringlengths 105 339 |
|---|---|---|---|---|---|---|---|---|---|---|---|
62,900 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.getModifiersStr | public String getModifiersStr() {
final StringBuilder buf = new StringBuilder();
TypeUtils.modifiersToString(modifiers, ModifierType.CLASS, /* ignored */ false, buf);
return buf.toString();
} | java | public String getModifiersStr() {
final StringBuilder buf = new StringBuilder();
TypeUtils.modifiersToString(modifiers, ModifierType.CLASS, /* ignored */ false, buf);
return buf.toString();
} | [
"public",
"String",
"getModifiersStr",
"(",
")",
"{",
"final",
"StringBuilder",
"buf",
"=",
"new",
"StringBuilder",
"(",
")",
";",
"TypeUtils",
".",
"modifiersToString",
"(",
"modifiers",
",",
"ModifierType",
".",
"CLASS",
",",
"/* ignored */",
"false",
",",
"... | Get the class modifiers as a String.
@return The field modifiers as a string, e.g. "public static final". For the modifier bits, call
{@link #getModifiers()}. | [
"Get",
"the",
"class",
"modifiers",
"as",
"a",
"String",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L981-L985 |
62,901 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.hasField | public boolean hasField(final String fieldName) {
for (final ClassInfo ci : getOverrideOrder()) {
if (ci.hasDeclaredField(fieldName)) {
return true;
}
}
return false;
} | java | public boolean hasField(final String fieldName) {
for (final ClassInfo ci : getOverrideOrder()) {
if (ci.hasDeclaredField(fieldName)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasField",
"(",
"final",
"String",
"fieldName",
")",
"{",
"for",
"(",
"final",
"ClassInfo",
"ci",
":",
"getOverrideOrder",
"(",
")",
")",
"{",
"if",
"(",
"ci",
".",
"hasDeclaredField",
"(",
"fieldName",
")",
")",
"{",
"return",
"tru... | Checks whether this class or one of its superclasses has the named field.
@param fieldName
The name of a field.
@return true if this class or one of its superclasses declares a field of the given name. | [
"Checks",
"whether",
"this",
"class",
"or",
"one",
"of",
"its",
"superclasses",
"has",
"the",
"named",
"field",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1175-L1182 |
62,902 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.hasDeclaredFieldAnnotation | public boolean hasDeclaredFieldAnnotation(final String fieldAnnotationName) {
for (final FieldInfo fi : getDeclaredFieldInfo()) {
if (fi.hasAnnotation(fieldAnnotationName)) {
return true;
}
}
return false;
} | java | public boolean hasDeclaredFieldAnnotation(final String fieldAnnotationName) {
for (final FieldInfo fi : getDeclaredFieldInfo()) {
if (fi.hasAnnotation(fieldAnnotationName)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasDeclaredFieldAnnotation",
"(",
"final",
"String",
"fieldAnnotationName",
")",
"{",
"for",
"(",
"final",
"FieldInfo",
"fi",
":",
"getDeclaredFieldInfo",
"(",
")",
")",
"{",
"if",
"(",
"fi",
".",
"hasAnnotation",
"(",
"fieldAnnotationName",
... | Checks whether this class declares a field with the named annotation.
@param fieldAnnotationName
The name of a field annotation.
@return true if this class declares a field with the named annotation. | [
"Checks",
"whether",
"this",
"class",
"declares",
"a",
"field",
"with",
"the",
"named",
"annotation",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1191-L1198 |
62,903 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.hasFieldAnnotation | public boolean hasFieldAnnotation(final String fieldAnnotationName) {
for (final ClassInfo ci : getOverrideOrder()) {
if (ci.hasDeclaredFieldAnnotation(fieldAnnotationName)) {
return true;
}
}
return false;
} | java | public boolean hasFieldAnnotation(final String fieldAnnotationName) {
for (final ClassInfo ci : getOverrideOrder()) {
if (ci.hasDeclaredFieldAnnotation(fieldAnnotationName)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasFieldAnnotation",
"(",
"final",
"String",
"fieldAnnotationName",
")",
"{",
"for",
"(",
"final",
"ClassInfo",
"ci",
":",
"getOverrideOrder",
"(",
")",
")",
"{",
"if",
"(",
"ci",
".",
"hasDeclaredFieldAnnotation",
"(",
"fieldAnnotationName",... | Checks whether this class or one of its superclasses declares a field with the named annotation.
@param fieldAnnotationName
The name of a field annotation.
@return true if this class or one of its superclasses declares a field with the named annotation. | [
"Checks",
"whether",
"this",
"class",
"or",
"one",
"of",
"its",
"superclasses",
"declares",
"a",
"field",
"with",
"the",
"named",
"annotation",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1207-L1214 |
62,904 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.hasMethod | public boolean hasMethod(final String methodName) {
for (final ClassInfo ci : getOverrideOrder()) {
if (ci.hasDeclaredMethod(methodName)) {
return true;
}
}
return false;
} | java | public boolean hasMethod(final String methodName) {
for (final ClassInfo ci : getOverrideOrder()) {
if (ci.hasDeclaredMethod(methodName)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasMethod",
"(",
"final",
"String",
"methodName",
")",
"{",
"for",
"(",
"final",
"ClassInfo",
"ci",
":",
"getOverrideOrder",
"(",
")",
")",
"{",
"if",
"(",
"ci",
".",
"hasDeclaredMethod",
"(",
"methodName",
")",
")",
"{",
"return",
... | Checks whether this class or one of its superclasses or interfaces declares a method of the given name.
@param methodName
The name of a method.
@return true if this class or one of its superclasses or interfaces declares a method of the given name. | [
"Checks",
"whether",
"this",
"class",
"or",
"one",
"of",
"its",
"superclasses",
"or",
"interfaces",
"declares",
"a",
"method",
"of",
"the",
"given",
"name",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1234-L1241 |
62,905 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.hasMethodAnnotation | public boolean hasMethodAnnotation(final String methodAnnotationName) {
for (final ClassInfo ci : getOverrideOrder()) {
if (ci.hasDeclaredMethodAnnotation(methodAnnotationName)) {
return true;
}
}
return false;
} | java | public boolean hasMethodAnnotation(final String methodAnnotationName) {
for (final ClassInfo ci : getOverrideOrder()) {
if (ci.hasDeclaredMethodAnnotation(methodAnnotationName)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasMethodAnnotation",
"(",
"final",
"String",
"methodAnnotationName",
")",
"{",
"for",
"(",
"final",
"ClassInfo",
"ci",
":",
"getOverrideOrder",
"(",
")",
")",
"{",
"if",
"(",
"ci",
".",
"hasDeclaredMethodAnnotation",
"(",
"methodAnnotationNa... | Checks whether this class or one of its superclasses or interfaces declares a method with the named
annotation.
@param methodAnnotationName
The name of a method annotation.
@return true if this class or one of its superclasses or interfaces declares a method with the named
annotation. | [
"Checks",
"whether",
"this",
"class",
"or",
"one",
"of",
"its",
"superclasses",
"or",
"interfaces",
"declares",
"a",
"method",
"with",
"the",
"named",
"annotation",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1268-L1275 |
62,906 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.hasMethodParameterAnnotation | public boolean hasMethodParameterAnnotation(final String methodParameterAnnotationName) {
for (final ClassInfo ci : getOverrideOrder()) {
if (ci.hasDeclaredMethodParameterAnnotation(methodParameterAnnotationName)) {
return true;
}
}
return false;
} | java | public boolean hasMethodParameterAnnotation(final String methodParameterAnnotationName) {
for (final ClassInfo ci : getOverrideOrder()) {
if (ci.hasDeclaredMethodParameterAnnotation(methodParameterAnnotationName)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasMethodParameterAnnotation",
"(",
"final",
"String",
"methodParameterAnnotationName",
")",
"{",
"for",
"(",
"final",
"ClassInfo",
"ci",
":",
"getOverrideOrder",
"(",
")",
")",
"{",
"if",
"(",
"ci",
".",
"hasDeclaredMethodParameterAnnotation",
... | Checks whether this class or one of its superclasses or interfaces has a method with the named annotation.
@param methodParameterAnnotationName
The name of a method annotation.
@return true if this class or one of its superclasses or interfaces has a method with the named annotation. | [
"Checks",
"whether",
"this",
"class",
"or",
"one",
"of",
"its",
"superclasses",
"or",
"interfaces",
"has",
"a",
"method",
"with",
"the",
"named",
"annotation",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1300-L1307 |
62,907 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.getOverrideOrder | private List<ClassInfo> getOverrideOrder(final Set<ClassInfo> visited, final List<ClassInfo> overrideOrderOut) {
if (visited.add(this)) {
overrideOrderOut.add(this);
for (final ClassInfo iface : getInterfaces()) {
iface.getOverrideOrder(visited, overrideOrderOut);
... | java | private List<ClassInfo> getOverrideOrder(final Set<ClassInfo> visited, final List<ClassInfo> overrideOrderOut) {
if (visited.add(this)) {
overrideOrderOut.add(this);
for (final ClassInfo iface : getInterfaces()) {
iface.getOverrideOrder(visited, overrideOrderOut);
... | [
"private",
"List",
"<",
"ClassInfo",
">",
"getOverrideOrder",
"(",
"final",
"Set",
"<",
"ClassInfo",
">",
"visited",
",",
"final",
"List",
"<",
"ClassInfo",
">",
"overrideOrderOut",
")",
"{",
"if",
"(",
"visited",
".",
"add",
"(",
"this",
")",
")",
"{",
... | Recurse to interfaces and superclasses to get the order that fields and methods are overridden in.
@param visited
visited
@param overrideOrderOut
the override order
@return the override order | [
"Recurse",
"to",
"interfaces",
"and",
"superclasses",
"to",
"get",
"the",
"order",
"that",
"fields",
"and",
"methods",
"are",
"overridden",
"in",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1320-L1332 |
62,908 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.getInterfaces | public ClassInfoList getInterfaces() {
// Classes also implement the interfaces of their superclasses
final ReachableAndDirectlyRelatedClasses implementedInterfaces = this
.filterClassInfo(RelType.IMPLEMENTED_INTERFACES, /* strictWhitelist = */ false);
final Set<ClassInfo> allInt... | java | public ClassInfoList getInterfaces() {
// Classes also implement the interfaces of their superclasses
final ReachableAndDirectlyRelatedClasses implementedInterfaces = this
.filterClassInfo(RelType.IMPLEMENTED_INTERFACES, /* strictWhitelist = */ false);
final Set<ClassInfo> allInt... | [
"public",
"ClassInfoList",
"getInterfaces",
"(",
")",
"{",
"// Classes also implement the interfaces of their superclasses",
"final",
"ReachableAndDirectlyRelatedClasses",
"implementedInterfaces",
"=",
"this",
".",
"filterClassInfo",
"(",
"RelType",
".",
"IMPLEMENTED_INTERFACES",
... | Get the interfaces implemented by this class or by one of its superclasses, if this is a standard class, or
the superinterfaces extended by this interface, if this is an interface.
@return The list of interfaces implemented by this class or by one of its superclasses, if this is a standard
class, or the superinterface... | [
"Get",
"the",
"interfaces",
"implemented",
"by",
"this",
"class",
"or",
"by",
"one",
"of",
"its",
"superclasses",
"if",
"this",
"is",
"a",
"standard",
"class",
"or",
"the",
"superinterfaces",
"extended",
"by",
"this",
"interface",
"if",
"this",
"is",
"an",
... | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1445-L1458 |
62,909 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.getClassesWithFieldOrMethodAnnotation | private ClassInfoList getClassesWithFieldOrMethodAnnotation(final RelType relType) {
final boolean isField = relType == RelType.CLASSES_WITH_FIELD_ANNOTATION;
if (!(isField ? scanResult.scanSpec.enableFieldInfo : scanResult.scanSpec.enableMethodInfo)
|| !scanResult.scanSpec.enableAnnotat... | java | private ClassInfoList getClassesWithFieldOrMethodAnnotation(final RelType relType) {
final boolean isField = relType == RelType.CLASSES_WITH_FIELD_ANNOTATION;
if (!(isField ? scanResult.scanSpec.enableFieldInfo : scanResult.scanSpec.enableMethodInfo)
|| !scanResult.scanSpec.enableAnnotat... | [
"private",
"ClassInfoList",
"getClassesWithFieldOrMethodAnnotation",
"(",
"final",
"RelType",
"relType",
")",
"{",
"final",
"boolean",
"isField",
"=",
"relType",
"==",
"RelType",
".",
"CLASSES_WITH_FIELD_ANNOTATION",
";",
"if",
"(",
"!",
"(",
"isField",
"?",
"scanRe... | Get the classes that have this class as a field, method or method parameter annotation.
@param relType
One of {@link RelType#CLASSES_WITH_FIELD_ANNOTATION},
{@link RelType#CLASSES_WITH_METHOD_ANNOTATION} or
{@link RelType#CLASSES_WITH_METHOD_PARAMETER_ANNOTATION}.
@return A list of classes that have a declared method ... | [
"Get",
"the",
"classes",
"that",
"have",
"this",
"class",
"as",
"a",
"field",
"method",
"or",
"method",
"parameter",
"annotation",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1571-L1598 |
62,910 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.getAnnotationDefaultParameterValues | public AnnotationParameterValueList getAnnotationDefaultParameterValues() {
if (!scanResult.scanSpec.enableAnnotationInfo) {
throw new IllegalArgumentException("Please call ClassGraph#enableAnnotationInfo() before #scan()");
}
if (!isAnnotation) {
throw new IllegalArgumen... | java | public AnnotationParameterValueList getAnnotationDefaultParameterValues() {
if (!scanResult.scanSpec.enableAnnotationInfo) {
throw new IllegalArgumentException("Please call ClassGraph#enableAnnotationInfo() before #scan()");
}
if (!isAnnotation) {
throw new IllegalArgumen... | [
"public",
"AnnotationParameterValueList",
"getAnnotationDefaultParameterValues",
"(",
")",
"{",
"if",
"(",
"!",
"scanResult",
".",
"scanSpec",
".",
"enableAnnotationInfo",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Please call ClassGraph#enableAnnotationInf... | Get the default parameter values for this annotation, if this is an annotation class.
@return A list of {@link AnnotationParameterValue} objects for each of the default parameter values for this
annotation, if this is an annotation class with default parameter values, otherwise the empty list. | [
"Get",
"the",
"default",
"parameter",
"values",
"for",
"this",
"annotation",
"if",
"this",
"is",
"an",
"annotation",
"class",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1667-L1682 |
62,911 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.getClassesWithAnnotation | public ClassInfoList getClassesWithAnnotation() {
if (!scanResult.scanSpec.enableAnnotationInfo) {
throw new IllegalArgumentException("Please call ClassGraph#enableAnnotationInfo() before #scan()");
}
if (!isAnnotation) {
throw new IllegalArgumentException("Class is not a... | java | public ClassInfoList getClassesWithAnnotation() {
if (!scanResult.scanSpec.enableAnnotationInfo) {
throw new IllegalArgumentException("Please call ClassGraph#enableAnnotationInfo() before #scan()");
}
if (!isAnnotation) {
throw new IllegalArgumentException("Class is not a... | [
"public",
"ClassInfoList",
"getClassesWithAnnotation",
"(",
")",
"{",
"if",
"(",
"!",
"scanResult",
".",
"scanSpec",
".",
"enableAnnotationInfo",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Please call ClassGraph#enableAnnotationInfo() before #scan()\"",
"... | Get the classes that have this class as an annotation.
@return A list of standard classes and non-annotation interfaces that are annotated by this class, if this is
an annotation class, or the empty list if none. Also handles the {@link Inherited} meta-annotation,
which causes an annotation on a class to be inherited ... | [
"Get",
"the",
"classes",
"that",
"have",
"this",
"class",
"as",
"an",
"annotation",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L1691-L1716 |
62,912 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.getTypeSignature | public ClassTypeSignature getTypeSignature() {
if (typeSignatureStr == null) {
return null;
}
if (typeSignature == null) {
try {
typeSignature = ClassTypeSignature.parse(typeSignatureStr, this);
typeSignature.setScanResult(scanResult);
... | java | public ClassTypeSignature getTypeSignature() {
if (typeSignatureStr == null) {
return null;
}
if (typeSignature == null) {
try {
typeSignature = ClassTypeSignature.parse(typeSignatureStr, this);
typeSignature.setScanResult(scanResult);
... | [
"public",
"ClassTypeSignature",
"getTypeSignature",
"(",
")",
"{",
"if",
"(",
"typeSignatureStr",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"typeSignature",
"==",
"null",
")",
"{",
"try",
"{",
"typeSignature",
"=",
"ClassTypeSignature",
... | Get the type signature of the class.
@return The class type signature, if available, otherwise returns null. | [
"Get",
"the",
"type",
"signature",
"of",
"the",
"class",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L2359-L2372 |
62,913 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.addReferencedClassNames | void addReferencedClassNames(final Set<String> refdClassNames) {
if (this.referencedClassNames == null) {
this.referencedClassNames = refdClassNames;
} else {
this.referencedClassNames.addAll(refdClassNames);
}
} | java | void addReferencedClassNames(final Set<String> refdClassNames) {
if (this.referencedClassNames == null) {
this.referencedClassNames = refdClassNames;
} else {
this.referencedClassNames.addAll(refdClassNames);
}
} | [
"void",
"addReferencedClassNames",
"(",
"final",
"Set",
"<",
"String",
">",
"refdClassNames",
")",
"{",
"if",
"(",
"this",
".",
"referencedClassNames",
"==",
"null",
")",
"{",
"this",
".",
"referencedClassNames",
"=",
"refdClassNames",
";",
"}",
"else",
"{",
... | Add names of classes referenced by this class.
@param refdClassNames
the referenced class names | [
"Add",
"names",
"of",
"classes",
"referenced",
"by",
"this",
"class",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L2590-L2596 |
62,914 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.findReferencedClassNames | @Override
protected void findReferencedClassNames(final Set<String> referencedClassNames) {
if (this.referencedClassNames != null) {
referencedClassNames.addAll(this.referencedClassNames);
}
getMethodInfo().findReferencedClassNames(referencedClassNames);
getFieldInfo().fi... | java | @Override
protected void findReferencedClassNames(final Set<String> referencedClassNames) {
if (this.referencedClassNames != null) {
referencedClassNames.addAll(this.referencedClassNames);
}
getMethodInfo().findReferencedClassNames(referencedClassNames);
getFieldInfo().fi... | [
"@",
"Override",
"protected",
"void",
"findReferencedClassNames",
"(",
"final",
"Set",
"<",
"String",
">",
"referencedClassNames",
")",
"{",
"if",
"(",
"this",
".",
"referencedClassNames",
"!=",
"null",
")",
"{",
"referencedClassNames",
".",
"addAll",
"(",
"this... | Get the names of any classes referenced in this class' type descriptor, or the type descriptors of fields,
methods or annotations.
@param referencedClassNames
the referenced class names | [
"Get",
"the",
"names",
"of",
"any",
"classes",
"referenced",
"in",
"this",
"class",
"type",
"descriptor",
"or",
"the",
"type",
"descriptors",
"of",
"fields",
"methods",
"or",
"annotations",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L2605-L2622 |
62,915 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfo.java | ClassInfo.getClassDependencies | public ClassInfoList getClassDependencies() {
if (!scanResult.scanSpec.enableInterClassDependencies) {
throw new IllegalArgumentException(
"Please call ClassGraph#enableInterClassDependencies() before #scan()");
}
return referencedClasses == null ? ClassInfoList.E... | java | public ClassInfoList getClassDependencies() {
if (!scanResult.scanSpec.enableInterClassDependencies) {
throw new IllegalArgumentException(
"Please call ClassGraph#enableInterClassDependencies() before #scan()");
}
return referencedClasses == null ? ClassInfoList.E... | [
"public",
"ClassInfoList",
"getClassDependencies",
"(",
")",
"{",
"if",
"(",
"!",
"scanResult",
".",
"scanSpec",
".",
"enableInterClassDependencies",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Please call ClassGraph#enableInterClassDependencies() before #sc... | Get the class dependencies.
@return A {@link ClassInfoList} of {@link ClassInfo} objects for all classes referenced by this class. Note
that you need to call {@link ClassGraph#enableInterClassDependencies()} before
{@link ClassGraph#scan()} for this method to work. You should also call
{@link ClassGraph#enableExternal... | [
"Get",
"the",
"class",
"dependencies",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfo.java#L2645-L2651 |
62,916 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/utils/FastPathResolver.java | FastPathResolver.translateSeparator | private static void translateSeparator(final String path, final int startIdx, final int endIdx,
final boolean stripFinalSeparator, final StringBuilder buf) {
for (int i = startIdx; i < endIdx; i++) {
final char c = path.charAt(i);
if (c == '\\' || c == '/') {
... | java | private static void translateSeparator(final String path, final int startIdx, final int endIdx,
final boolean stripFinalSeparator, final StringBuilder buf) {
for (int i = startIdx; i < endIdx; i++) {
final char c = path.charAt(i);
if (c == '\\' || c == '/') {
... | [
"private",
"static",
"void",
"translateSeparator",
"(",
"final",
"String",
"path",
",",
"final",
"int",
"startIdx",
",",
"final",
"int",
"endIdx",
",",
"final",
"boolean",
"stripFinalSeparator",
",",
"final",
"StringBuilder",
"buf",
")",
"{",
"for",
"(",
"int"... | Translate backslashes to forward slashes, optionally removing trailing separator.
@param path
the path
@param startIdx
the start index
@param endIdx
the end index
@param stripFinalSeparator
if true, strip the final separator
@param buf
the buf | [
"Translate",
"backslashes",
"to",
"forward",
"slashes",
"optionally",
"removing",
"trailing",
"separator",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/utils/FastPathResolver.java#L69-L86 |
62,917 | classgraph/classgraph | src/main/java/io/github/classgraph/AnnotationClassRef.java | AnnotationClassRef.getTypeSignature | private TypeSignature getTypeSignature() {
if (typeSignature == null) {
try {
// There can't be any type variables to resolve in either ClassRefTypeSignature or
// BaseTypeSignature, so just set definingClassName to null
typeSignature = TypeSignature.p... | java | private TypeSignature getTypeSignature() {
if (typeSignature == null) {
try {
// There can't be any type variables to resolve in either ClassRefTypeSignature or
// BaseTypeSignature, so just set definingClassName to null
typeSignature = TypeSignature.p... | [
"private",
"TypeSignature",
"getTypeSignature",
"(",
")",
"{",
"if",
"(",
"typeSignature",
"==",
"null",
")",
"{",
"try",
"{",
"// There can't be any type variables to resolve in either ClassRefTypeSignature or",
"// BaseTypeSignature, so just set definingClassName to null",
"typeS... | Get the type signature.
@return The type signature of the {@code Class<?>} reference. This will be a {@link ClassRefTypeSignature} or
a {@link BaseTypeSignature}. | [
"Get",
"the",
"type",
"signature",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/AnnotationClassRef.java#L83-L95 |
62,918 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler.java | NestedJarHandler.sanitizeFilename | private String sanitizeFilename(final String filename) {
return filename.replace('/', '_').replace('\\', '_').replace(':', '_').replace('?', '_').replace('&', '_')
.replace('=', '_').replace(' ', '_');
} | java | private String sanitizeFilename(final String filename) {
return filename.replace('/', '_').replace('\\', '_').replace(':', '_').replace('?', '_').replace('&', '_')
.replace('=', '_').replace(' ', '_');
} | [
"private",
"String",
"sanitizeFilename",
"(",
"final",
"String",
"filename",
")",
"{",
"return",
"filename",
".",
"replace",
"(",
"'",
"'",
",",
"'",
"'",
")",
".",
"replace",
"(",
"'",
"'",
",",
"'",
"'",
")",
".",
"replace",
"(",
"'",
"'",
",",
... | Sanitize filename.
@param filename
the filename
@return the sanitized filename | [
"Sanitize",
"filename",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler.java#L489-L492 |
62,919 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler.java | NestedJarHandler.makeTempFile | private File makeTempFile(final String filePath, final boolean onlyUseLeafname) throws IOException {
final File tempFile = File.createTempFile("ClassGraph--",
TEMP_FILENAME_LEAF_SEPARATOR + sanitizeFilename(onlyUseLeafname ? leafname(filePath) : filePath));
tempFile.deleteOnExit();
... | java | private File makeTempFile(final String filePath, final boolean onlyUseLeafname) throws IOException {
final File tempFile = File.createTempFile("ClassGraph--",
TEMP_FILENAME_LEAF_SEPARATOR + sanitizeFilename(onlyUseLeafname ? leafname(filePath) : filePath));
tempFile.deleteOnExit();
... | [
"private",
"File",
"makeTempFile",
"(",
"final",
"String",
"filePath",
",",
"final",
"boolean",
"onlyUseLeafname",
")",
"throws",
"IOException",
"{",
"final",
"File",
"tempFile",
"=",
"File",
".",
"createTempFile",
"(",
"\"ClassGraph--\"",
",",
"TEMP_FILENAME_LEAF_S... | Create a temporary file, and mark it for deletion on exit.
@param filePath
The path to derive the temporary filename from.
@param onlyUseLeafname
If true, only use the leafname of filePath to derive the temporary filename.
@return The temporary {@link File}.
@throws IOException
If the temporary file could not be creat... | [
"Create",
"a",
"temporary",
"file",
"and",
"mark",
"it",
"for",
"deletion",
"on",
"exit",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler.java#L505-L511 |
62,920 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler.java | NestedJarHandler.downloadTempFile | private File downloadTempFile(final String jarURL, final LogNode log) {
final LogNode subLog = log == null ? null : log.log(jarURL, "Downloading URL " + jarURL);
File tempFile;
try {
tempFile = makeTempFile(jarURL, /* onlyUseLeafname = */ true);
final URL url = new URL(ja... | java | private File downloadTempFile(final String jarURL, final LogNode log) {
final LogNode subLog = log == null ? null : log.log(jarURL, "Downloading URL " + jarURL);
File tempFile;
try {
tempFile = makeTempFile(jarURL, /* onlyUseLeafname = */ true);
final URL url = new URL(ja... | [
"private",
"File",
"downloadTempFile",
"(",
"final",
"String",
"jarURL",
",",
"final",
"LogNode",
"log",
")",
"{",
"final",
"LogNode",
"subLog",
"=",
"log",
"==",
"null",
"?",
"null",
":",
"log",
".",
"log",
"(",
"jarURL",
",",
"\"Downloading URL \"",
"+",... | Download a jar from a URL to a temporary file.
@param jarURL
the jar URL
@param log
the log
@return the temporary file the jar was downloaded to | [
"Download",
"a",
"jar",
"from",
"a",
"URL",
"to",
"a",
"temporary",
"file",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/NestedJarHandler.java#L522-L547 |
62,921 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfoList.java | ClassInfoList.generateGraphVizDotFile | public String generateGraphVizDotFile(final float sizeX, final float sizeY) {
return generateGraphVizDotFile(sizeX, sizeY, /* showFields = */ true,
/* showFieldTypeDependencyEdges = */ true, /* showMethods = */ true,
/* showMethodTypeDependencyEdges = */ true, /* showAnnotations ... | java | public String generateGraphVizDotFile(final float sizeX, final float sizeY) {
return generateGraphVizDotFile(sizeX, sizeY, /* showFields = */ true,
/* showFieldTypeDependencyEdges = */ true, /* showMethods = */ true,
/* showMethodTypeDependencyEdges = */ true, /* showAnnotations ... | [
"public",
"String",
"generateGraphVizDotFile",
"(",
"final",
"float",
"sizeX",
",",
"final",
"float",
"sizeY",
")",
"{",
"return",
"generateGraphVizDotFile",
"(",
"sizeX",
",",
"sizeY",
",",
"/* showFields = */",
"true",
",",
"/* showFieldTypeDependencyEdges = */",
"t... | Generate a .dot file which can be fed into GraphViz for layout and visualization of the class graph.
<p>
Methods, fields and annotations are shown if enabled, via {@link ClassGraph#enableMethodInfo()},
{@link ClassGraph#enableFieldInfo()} and {@link ClassGraph#enableAnnotationInfo()}.
<p>
Only public classes, methods... | [
"Generate",
"a",
".",
"dot",
"file",
"which",
"can",
"be",
"fed",
"into",
"GraphViz",
"for",
"layout",
"and",
"visualization",
"of",
"the",
"class",
"graph",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfoList.java#L732-L736 |
62,922 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassInfoList.java | ClassInfoList.generateGraphVizDotFile | public void generateGraphVizDotFile(final File file) throws IOException {
try (PrintWriter writer = new PrintWriter(file)) {
writer.print(generateGraphVizDotFile());
}
} | java | public void generateGraphVizDotFile(final File file) throws IOException {
try (PrintWriter writer = new PrintWriter(file)) {
writer.print(generateGraphVizDotFile());
}
} | [
"public",
"void",
"generateGraphVizDotFile",
"(",
"final",
"File",
"file",
")",
"throws",
"IOException",
"{",
"try",
"(",
"PrintWriter",
"writer",
"=",
"new",
"PrintWriter",
"(",
"file",
")",
")",
"{",
"writer",
".",
"print",
"(",
"generateGraphVizDotFile",
"(... | Generate a and save a .dot file, which can be fed into GraphViz for layout and visualization of the class
graph.
<p>
Methods, fields and annotations are shown if enabled, via {@link ClassGraph#enableMethodInfo()},
{@link ClassGraph#enableFieldInfo()} and {@link ClassGraph#enableAnnotationInfo()}.
<p>
Only public clas... | [
"Generate",
"a",
"and",
"save",
"a",
".",
"dot",
"file",
"which",
"can",
"be",
"fed",
"into",
"GraphViz",
"for",
"layout",
"and",
"visualization",
"of",
"the",
"class",
"graph",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassInfoList.java#L782-L786 |
62,923 | classgraph/classgraph | src/main/java/io/github/classgraph/MappableInfoList.java | MappableInfoList.containsName | public boolean containsName(final String name) {
for (final T i : this) {
if (i.getName().equals(name)) {
return true;
}
}
return false;
} | java | public boolean containsName(final String name) {
for (final T i : this) {
if (i.getName().equals(name)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"containsName",
"(",
"final",
"String",
"name",
")",
"{",
"for",
"(",
"final",
"T",
"i",
":",
"this",
")",
"{",
"if",
"(",
"i",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"name",
")",
")",
"{",
"return",
"true",
";",
"}",
... | Check if this list contains an item with the given name.
@param name
The name to search for.
@return true if this list contains an item with the given name. | [
"Check",
"if",
"this",
"list",
"contains",
"an",
"item",
"with",
"the",
"given",
"name",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/MappableInfoList.java#L91-L98 |
62,924 | classgraph/classgraph | src/main/java/io/github/classgraph/MappableInfoList.java | MappableInfoList.get | public T get(final String name) {
for (final T i : this) {
if (i.getName().equals(name)) {
return i;
}
}
return null;
} | java | public T get(final String name) {
for (final T i : this) {
if (i.getName().equals(name)) {
return i;
}
}
return null;
} | [
"public",
"T",
"get",
"(",
"final",
"String",
"name",
")",
"{",
"for",
"(",
"final",
"T",
"i",
":",
"this",
")",
"{",
"if",
"(",
"i",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"name",
")",
")",
"{",
"return",
"i",
";",
"}",
"}",
"return",... | Get the list item with the given name, or null if not found.
@param name
The name to search for.
@return The list item with the given name, or null if not found. | [
"Get",
"the",
"list",
"item",
"with",
"the",
"given",
"name",
"or",
"null",
"if",
"not",
"found",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/MappableInfoList.java#L107-L114 |
62,925 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/concurrency/WorkQueue.java | WorkQueue.runWorkQueue | public static <U> void runWorkQueue(final Collection<U> elements, final ExecutorService executorService,
final InterruptionChecker interruptionChecker, final int numParallelTasks, final LogNode log,
final WorkUnitProcessor<U> workUnitProcessor) throws InterruptedException, ExecutionException {
... | java | public static <U> void runWorkQueue(final Collection<U> elements, final ExecutorService executorService,
final InterruptionChecker interruptionChecker, final int numParallelTasks, final LogNode log,
final WorkUnitProcessor<U> workUnitProcessor) throws InterruptedException, ExecutionException {
... | [
"public",
"static",
"<",
"U",
">",
"void",
"runWorkQueue",
"(",
"final",
"Collection",
"<",
"U",
">",
"elements",
",",
"final",
"ExecutorService",
"executorService",
",",
"final",
"InterruptionChecker",
"interruptionChecker",
",",
"final",
"int",
"numParallelTasks",... | Start a work queue on the elements in the provided collection, blocking until all work units have been
completed.
@param <U>
The type of the work queue units.
@param elements
The work queue units to process.
@param executorService
The {@link ExecutorService}.
@param interruptionChecker
the interruption checker
@param ... | [
"Start",
"a",
"work",
"queue",
"on",
"the",
"elements",
"in",
"the",
"provided",
"collection",
"blocking",
"until",
"all",
"work",
"units",
"have",
"been",
"completed",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/concurrency/WorkQueue.java#L145-L163 |
62,926 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/concurrency/WorkQueue.java | WorkQueue.startWorkers | private void startWorkers(final ExecutorService executorService, final int numTasks) {
for (int i = 0; i < numTasks; i++) {
workerFutures.add(executorService.submit(new Callable<Void>() {
@Override
public Void call() throws Exception {
runWorkLoop(... | java | private void startWorkers(final ExecutorService executorService, final int numTasks) {
for (int i = 0; i < numTasks; i++) {
workerFutures.add(executorService.submit(new Callable<Void>() {
@Override
public Void call() throws Exception {
runWorkLoop(... | [
"private",
"void",
"startWorkers",
"(",
"final",
"ExecutorService",
"executorService",
",",
"final",
"int",
"numTasks",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numTasks",
";",
"i",
"++",
")",
"{",
"workerFutures",
".",
"add",
"(",
"... | Start worker threads with a shared log.
@param executorService
the executor service
@param numTasks
the number of worker tasks to start | [
"Start",
"worker",
"threads",
"with",
"a",
"shared",
"log",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/concurrency/WorkQueue.java#L196-L206 |
62,927 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/concurrency/WorkQueue.java | WorkQueue.sendPoisonPills | private void sendPoisonPills() {
for (int i = 0; i < numWorkers; i++) {
workUnits.add(new WorkUnitWrapper<T>(null));
}
} | java | private void sendPoisonPills() {
for (int i = 0; i < numWorkers; i++) {
workUnits.add(new WorkUnitWrapper<T>(null));
}
} | [
"private",
"void",
"sendPoisonPills",
"(",
")",
"{",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i",
"<",
"numWorkers",
";",
"i",
"++",
")",
"{",
"workUnits",
".",
"add",
"(",
"new",
"WorkUnitWrapper",
"<",
"T",
">",
"(",
"null",
")",
")",
";",
"}",
... | Send poison pills to workers. | [
"Send",
"poison",
"pills",
"to",
"workers",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/concurrency/WorkQueue.java#L211-L215 |
62,928 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/concurrency/WorkQueue.java | WorkQueue.addWorkUnit | public void addWorkUnit(final T workUnit) {
if (workUnit == null) {
throw new NullPointerException("workUnit cannot be null");
}
numIncompleteWorkUnits.incrementAndGet();
workUnits.add(new WorkUnitWrapper<>(workUnit));
} | java | public void addWorkUnit(final T workUnit) {
if (workUnit == null) {
throw new NullPointerException("workUnit cannot be null");
}
numIncompleteWorkUnits.incrementAndGet();
workUnits.add(new WorkUnitWrapper<>(workUnit));
} | [
"public",
"void",
"addWorkUnit",
"(",
"final",
"T",
"workUnit",
")",
"{",
"if",
"(",
"workUnit",
"==",
"null",
")",
"{",
"throw",
"new",
"NullPointerException",
"(",
"\"workUnit cannot be null\"",
")",
";",
"}",
"numIncompleteWorkUnits",
".",
"incrementAndGet",
... | Add a unit of work. May be called by workers to add more work units to the tail of the queue.
@param workUnit
the work unit
@throws NullPointerException
if the work unit is null. | [
"Add",
"a",
"unit",
"of",
"work",
".",
"May",
"be",
"called",
"by",
"workers",
"to",
"add",
"more",
"work",
"units",
"to",
"the",
"tail",
"of",
"the",
"queue",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/concurrency/WorkQueue.java#L276-L282 |
62,929 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/json/ClassFieldCache.java | ClassFieldCache.get | ClassFields get(final Class<?> cls) {
ClassFields classFields = classToClassFields.get(cls);
if (classFields == null) {
classToClassFields.put(cls,
classFields = new ClassFields(cls, resolveTypes, onlySerializePublicFields, this));
}
return classFields;
... | java | ClassFields get(final Class<?> cls) {
ClassFields classFields = classToClassFields.get(cls);
if (classFields == null) {
classToClassFields.put(cls,
classFields = new ClassFields(cls, resolveTypes, onlySerializePublicFields, this));
}
return classFields;
... | [
"ClassFields",
"get",
"(",
"final",
"Class",
"<",
"?",
">",
"cls",
")",
"{",
"ClassFields",
"classFields",
"=",
"classToClassFields",
".",
"get",
"(",
"cls",
")",
";",
"if",
"(",
"classFields",
"==",
"null",
")",
"{",
"classToClassFields",
".",
"put",
"(... | For a given resolved type, find the visible and accessible fields, resolve the types of any generically typed
fields, and return the resolved fields.
@param cls
the cls
@return the class fields | [
"For",
"a",
"given",
"resolved",
"type",
"find",
"the",
"visible",
"and",
"accessible",
"fields",
"resolve",
"the",
"types",
"of",
"any",
"generically",
"typed",
"fields",
"and",
"return",
"the",
"resolved",
"fields",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/json/ClassFieldCache.java#L131-L138 |
62,930 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/json/ClassFieldCache.java | ClassFieldCache.getConcreteType | private static Class<?> getConcreteType(final Class<?> rawType, final boolean returnNullIfNotMapOrCollection) {
// This list is not complete (e.g. EnumMap cannot be instantiated directly, you need to pass the
// enum key type into a factory method), but this should cover a lot of the common types
... | java | private static Class<?> getConcreteType(final Class<?> rawType, final boolean returnNullIfNotMapOrCollection) {
// This list is not complete (e.g. EnumMap cannot be instantiated directly, you need to pass the
// enum key type into a factory method), but this should cover a lot of the common types
... | [
"private",
"static",
"Class",
"<",
"?",
">",
"getConcreteType",
"(",
"final",
"Class",
"<",
"?",
">",
"rawType",
",",
"final",
"boolean",
"returnNullIfNotMapOrCollection",
")",
"{",
"// This list is not complete (e.g. EnumMap cannot be instantiated directly, you need to pass ... | Get the concrete type for a map or collection whose raw type is an interface or abstract class.
@param rawType
the raw type
@param returnNullIfNotMapOrCollection
return null if not map or collection
@return the concrete type | [
"Get",
"the",
"concrete",
"type",
"for",
"a",
"map",
"or",
"collection",
"whose",
"raw",
"type",
"is",
"an",
"interface",
"or",
"abstract",
"class",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/json/ClassFieldCache.java#L149-L181 |
62,931 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/json/ClassFieldCache.java | ClassFieldCache.getDefaultConstructorForConcreteTypeOf | Constructor<?> getDefaultConstructorForConcreteTypeOf(final Class<?> cls) {
if (cls == null) {
throw new IllegalArgumentException("Class reference cannot be null");
}
// Check cache
final Constructor<?> constructor = defaultConstructorForConcreteType.get(cls);
if (con... | java | Constructor<?> getDefaultConstructorForConcreteTypeOf(final Class<?> cls) {
if (cls == null) {
throw new IllegalArgumentException("Class reference cannot be null");
}
// Check cache
final Constructor<?> constructor = defaultConstructorForConcreteType.get(cls);
if (con... | [
"Constructor",
"<",
"?",
">",
"getDefaultConstructorForConcreteTypeOf",
"(",
"final",
"Class",
"<",
"?",
">",
"cls",
")",
"{",
"if",
"(",
"cls",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Class reference cannot be null\"",
")",
"... | Get the concrete type of the given class, then return the default constructor for that type.
@param cls
the class
@return the default constructor for concrete type of class
@throws IllegalArgumentException
if no default constructor is both found and accessible. | [
"Get",
"the",
"concrete",
"type",
"of",
"the",
"given",
"class",
"then",
"return",
"the",
"default",
"constructor",
"for",
"that",
"type",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/json/ClassFieldCache.java#L192-L216 |
62,932 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/json/JSONUtils.java | JSONUtils.getFieldValue | static Object getFieldValue(final Object containingObj, final Field field)
throws IllegalArgumentException, IllegalAccessException {
final Class<?> fieldType = field.getType();
if (fieldType == Integer.TYPE) {
return field.getInt(containingObj);
} else if (fieldType == Lo... | java | static Object getFieldValue(final Object containingObj, final Field field)
throws IllegalArgumentException, IllegalAccessException {
final Class<?> fieldType = field.getType();
if (fieldType == Integer.TYPE) {
return field.getInt(containingObj);
} else if (fieldType == Lo... | [
"static",
"Object",
"getFieldValue",
"(",
"final",
"Object",
"containingObj",
",",
"final",
"Field",
"field",
")",
"throws",
"IllegalArgumentException",
",",
"IllegalAccessException",
"{",
"final",
"Class",
"<",
"?",
">",
"fieldType",
"=",
"field",
".",
"getType",... | Get a field value, appropriately handling primitive-typed fields.
@param containingObj
the containing object
@param field
the field
@return the field value
@throws IllegalArgumentException
if the specified object is not an instance of the class or interface declaring the underlying
field
@throws IllegalAccessException... | [
"Get",
"a",
"field",
"value",
"appropriately",
"handling",
"primitive",
"-",
"typed",
"fields",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/json/JSONUtils.java#L195-L217 |
62,933 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/json/JSONUtils.java | JSONUtils.isBasicValueType | static boolean isBasicValueType(final Type type) {
if (type instanceof Class<?>) {
return isBasicValueType((Class<?>) type);
} else if (type instanceof ParameterizedType) {
return isBasicValueType(((ParameterizedType) type).getRawType());
} else {
return false... | java | static boolean isBasicValueType(final Type type) {
if (type instanceof Class<?>) {
return isBasicValueType((Class<?>) type);
} else if (type instanceof ParameterizedType) {
return isBasicValueType(((ParameterizedType) type).getRawType());
} else {
return false... | [
"static",
"boolean",
"isBasicValueType",
"(",
"final",
"Type",
"type",
")",
"{",
"if",
"(",
"type",
"instanceof",
"Class",
"<",
"?",
">",
")",
"{",
"return",
"isBasicValueType",
"(",
"(",
"Class",
"<",
"?",
">",
")",
"type",
")",
";",
"}",
"else",
"i... | Return true for types that can be converted directly to and from string representation.
@param type
the type
@return true, if the type is a basic value type | [
"Return",
"true",
"for",
"types",
"that",
"can",
"be",
"converted",
"directly",
"to",
"and",
"from",
"string",
"representation",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/json/JSONUtils.java#L249-L257 |
62,934 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/json/JSONUtils.java | JSONUtils.isBasicValueType | static boolean isBasicValueType(final Object obj) {
return obj == null || obj instanceof String || obj instanceof Integer || obj instanceof Boolean
|| obj instanceof Long || obj instanceof Float || obj instanceof Double || obj instanceof Short
|| obj instanceof Byte || obj instan... | java | static boolean isBasicValueType(final Object obj) {
return obj == null || obj instanceof String || obj instanceof Integer || obj instanceof Boolean
|| obj instanceof Long || obj instanceof Float || obj instanceof Double || obj instanceof Short
|| obj instanceof Byte || obj instan... | [
"static",
"boolean",
"isBasicValueType",
"(",
"final",
"Object",
"obj",
")",
"{",
"return",
"obj",
"==",
"null",
"||",
"obj",
"instanceof",
"String",
"||",
"obj",
"instanceof",
"Integer",
"||",
"obj",
"instanceof",
"Boolean",
"||",
"obj",
"instanceof",
"Long",... | Return true for objects that can be converted directly to and from string representation.
@param obj
the object
@return true, if the object is null or of basic value type | [
"Return",
"true",
"for",
"objects",
"that",
"can",
"be",
"converted",
"directly",
"to",
"and",
"from",
"string",
"representation",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/json/JSONUtils.java#L266-L270 |
62,935 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/json/JSONUtils.java | JSONUtils.fieldIsSerializable | static boolean fieldIsSerializable(final Field field, final boolean onlySerializePublicFields) {
final int modifiers = field.getModifiers();
if ((!onlySerializePublicFields || Modifier.isPublic(modifiers)) && !Modifier.isTransient(modifiers)
&& !Modifier.isFinal(modifiers) && ((modifiers... | java | static boolean fieldIsSerializable(final Field field, final boolean onlySerializePublicFields) {
final int modifiers = field.getModifiers();
if ((!onlySerializePublicFields || Modifier.isPublic(modifiers)) && !Modifier.isTransient(modifiers)
&& !Modifier.isFinal(modifiers) && ((modifiers... | [
"static",
"boolean",
"fieldIsSerializable",
"(",
"final",
"Field",
"field",
",",
"final",
"boolean",
"onlySerializePublicFields",
")",
"{",
"final",
"int",
"modifiers",
"=",
"field",
".",
"getModifiers",
"(",
")",
";",
"if",
"(",
"(",
"!",
"onlySerializePublicFi... | Check if a field is serializable. Don't serialize transient, final, synthetic, or inaccessible fields.
<p>
N.B. Tries to set field to accessible, which will require an "opens" declarations from modules that want to
allow this introspection.
@param field
the field
@param onlySerializePublicFields
if true, only seriali... | [
"Check",
"if",
"a",
"field",
"is",
"serializable",
".",
"Don",
"t",
"serialize",
"transient",
"final",
"synthetic",
"or",
"inaccessible",
"fields",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/json/JSONUtils.java#L353-L360 |
62,936 | classgraph/classgraph | src/main/java/io/github/classgraph/AnnotationInfo.java | AnnotationInfo.getParameterValues | public AnnotationParameterValueList getParameterValues() {
if (annotationParamValuesWithDefaults == null) {
final ClassInfo classInfo = getClassInfo();
if (classInfo == null) {
// ClassInfo has not yet been set, just return values without defaults
// (happ... | java | public AnnotationParameterValueList getParameterValues() {
if (annotationParamValuesWithDefaults == null) {
final ClassInfo classInfo = getClassInfo();
if (classInfo == null) {
// ClassInfo has not yet been set, just return values without defaults
// (happ... | [
"public",
"AnnotationParameterValueList",
"getParameterValues",
"(",
")",
"{",
"if",
"(",
"annotationParamValuesWithDefaults",
"==",
"null",
")",
"{",
"final",
"ClassInfo",
"classInfo",
"=",
"getClassInfo",
"(",
")",
";",
"if",
"(",
"classInfo",
"==",
"null",
")",... | Get the parameter values.
@return The parameter values of this annotation, including any default parameter values inherited from the
annotation class definition, or the empty list if none. | [
"Get",
"the",
"parameter",
"values",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/AnnotationInfo.java#L119-L193 |
62,937 | classgraph/classgraph | src/main/java/io/github/classgraph/MethodInfo.java | MethodInfo.getAnnotationInfo | public AnnotationInfoList getAnnotationInfo() {
if (!scanResult.scanSpec.enableAnnotationInfo) {
throw new IllegalArgumentException("Please call ClassGraph#enableAnnotationInfo() before #scan()");
}
return annotationInfo == null ? AnnotationInfoList.EMPTY_LIST
: Annot... | java | public AnnotationInfoList getAnnotationInfo() {
if (!scanResult.scanSpec.enableAnnotationInfo) {
throw new IllegalArgumentException("Please call ClassGraph#enableAnnotationInfo() before #scan()");
}
return annotationInfo == null ? AnnotationInfoList.EMPTY_LIST
: Annot... | [
"public",
"AnnotationInfoList",
"getAnnotationInfo",
"(",
")",
"{",
"if",
"(",
"!",
"scanResult",
".",
"scanSpec",
".",
"enableAnnotationInfo",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Please call ClassGraph#enableAnnotationInfo() before #scan()\"",
")"... | Get a list of annotations on this method, along with any annotation parameter values.
@return a list of annotations on this method, along with any annotation parameter values, wrapped in
{@link AnnotationInfo} objects, or the empty list if none. | [
"Get",
"a",
"list",
"of",
"annotations",
"on",
"this",
"method",
"along",
"with",
"any",
"annotation",
"parameter",
"values",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/MethodInfo.java#L473-L479 |
62,938 | classgraph/classgraph | src/main/java/io/github/classgraph/MethodInfo.java | MethodInfo.hasParameterAnnotation | public boolean hasParameterAnnotation(final String annotationName) {
for (final MethodParameterInfo methodParameterInfo : getParameterInfo()) {
if (methodParameterInfo.hasAnnotation(annotationName)) {
return true;
}
}
return false;
} | java | public boolean hasParameterAnnotation(final String annotationName) {
for (final MethodParameterInfo methodParameterInfo : getParameterInfo()) {
if (methodParameterInfo.hasAnnotation(annotationName)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"hasParameterAnnotation",
"(",
"final",
"String",
"annotationName",
")",
"{",
"for",
"(",
"final",
"MethodParameterInfo",
"methodParameterInfo",
":",
"getParameterInfo",
"(",
")",
")",
"{",
"if",
"(",
"methodParameterInfo",
".",
"hasAnnotation",
... | Check if this method has a parameter with the named annotation.
@param annotationName
The name of a method parameter annotation.
@return true if this method has a parameter with the named annotation. | [
"Check",
"if",
"this",
"method",
"has",
"a",
"parameter",
"with",
"the",
"named",
"annotation",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/MethodInfo.java#L525-L532 |
62,939 | classgraph/classgraph | src/main/java/io/github/classgraph/MethodInfo.java | MethodInfo.compareTo | @Override
public int compareTo(final MethodInfo other) {
final int diff0 = declaringClassName.compareTo(other.declaringClassName);
if (diff0 != 0) {
return diff0;
}
final int diff1 = name.compareTo(other.name);
if (diff1 != 0) {
return diff1;
}... | java | @Override
public int compareTo(final MethodInfo other) {
final int diff0 = declaringClassName.compareTo(other.declaringClassName);
if (diff0 != 0) {
return diff0;
}
final int diff1 = name.compareTo(other.name);
if (diff1 != 0) {
return diff1;
}... | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"final",
"MethodInfo",
"other",
")",
"{",
"final",
"int",
"diff0",
"=",
"declaringClassName",
".",
"compareTo",
"(",
"other",
".",
"declaringClassName",
")",
";",
"if",
"(",
"diff0",
"!=",
"0",
")",
"{",
... | Sort in order of class name, method name, then type descriptor.
@param other
the other {@link MethodInfo} to compare.
@return the result of the comparison. | [
"Sort",
"in",
"order",
"of",
"class",
"name",
"method",
"name",
"then",
"type",
"descriptor",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/MethodInfo.java#L717-L728 |
62,940 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/utils/VersionFinder.java | VersionFinder.getVersion | public static synchronized String getVersion() {
// Try to get version number from pom.xml (available when running in Eclipse)
final Class<?> cls = ClassGraph.class;
try {
final String className = cls.getName();
final URL classpathResource = cls.getResource("/" + JarUtils... | java | public static synchronized String getVersion() {
// Try to get version number from pom.xml (available when running in Eclipse)
final Class<?> cls = ClassGraph.class;
try {
final String className = cls.getName();
final URL classpathResource = cls.getResource("/" + JarUtils... | [
"public",
"static",
"synchronized",
"String",
"getVersion",
"(",
")",
"{",
"// Try to get version number from pom.xml (available when running in Eclipse)",
"final",
"Class",
"<",
"?",
">",
"cls",
"=",
"ClassGraph",
".",
"class",
";",
"try",
"{",
"final",
"String",
"cl... | Get the version number of ClassGraph.
@return the version number of ClassGraph. | [
"Get",
"the",
"version",
"number",
"of",
"ClassGraph",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/utils/VersionFinder.java#L206-L278 |
62,941 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java | ZipFileSliceReader.getChunk | private ByteBuffer getChunk(final int chunkIdx) throws IOException, InterruptedException {
ByteBuffer chunk = chunkCache[chunkIdx];
if (chunk == null) {
final ByteBuffer byteBufferDup = zipFileSlice.physicalZipFile.getByteBuffer(chunkIdx).duplicate();
chunk = chunkCache[chunkIdx]... | java | private ByteBuffer getChunk(final int chunkIdx) throws IOException, InterruptedException {
ByteBuffer chunk = chunkCache[chunkIdx];
if (chunk == null) {
final ByteBuffer byteBufferDup = zipFileSlice.physicalZipFile.getByteBuffer(chunkIdx).duplicate();
chunk = chunkCache[chunkIdx]... | [
"private",
"ByteBuffer",
"getChunk",
"(",
"final",
"int",
"chunkIdx",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"ByteBuffer",
"chunk",
"=",
"chunkCache",
"[",
"chunkIdx",
"]",
";",
"if",
"(",
"chunk",
"==",
"null",
")",
"{",
"final",
"B... | Get the 2GB chunk of the zipfile with the given chunk index.
@param chunkIdx
the chunk index
@return the chunk
@throws IOException
if an I/O exception occurs.
@throws InterruptedException
if the thread was interrupted. | [
"Get",
"the",
"2GB",
"chunk",
"of",
"the",
"zipfile",
"with",
"the",
"given",
"chunk",
"index",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java#L76-L83 |
62,942 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java | ZipFileSliceReader.getShort | static int getShort(final byte[] arr, final long off) throws IndexOutOfBoundsException {
final int ioff = (int) off;
if (ioff < 0 || ioff > arr.length - 2) {
throw new IndexOutOfBoundsException();
}
return ((arr[ioff + 1] & 0xff) << 8) | (arr[ioff] & 0xff);
} | java | static int getShort(final byte[] arr, final long off) throws IndexOutOfBoundsException {
final int ioff = (int) off;
if (ioff < 0 || ioff > arr.length - 2) {
throw new IndexOutOfBoundsException();
}
return ((arr[ioff + 1] & 0xff) << 8) | (arr[ioff] & 0xff);
} | [
"static",
"int",
"getShort",
"(",
"final",
"byte",
"[",
"]",
"arr",
",",
"final",
"long",
"off",
")",
"throws",
"IndexOutOfBoundsException",
"{",
"final",
"int",
"ioff",
"=",
"(",
"int",
")",
"off",
";",
"if",
"(",
"ioff",
"<",
"0",
"||",
"ioff",
">"... | Get a short from a byte array.
@param arr
the byte array
@param off
the offset to start reading from
@return the short
@throws IndexOutOfBoundsException
the index out of bounds exception | [
"Get",
"a",
"short",
"from",
"a",
"byte",
"array",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java#L154-L160 |
62,943 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java | ZipFileSliceReader.getShort | int getShort(final long off) throws IOException, InterruptedException {
if (off < 0 || off > zipFileSlice.len - 2) {
throw new IndexOutOfBoundsException();
}
if (read(off, scratch, 0, 2) < 2) {
throw new EOFException("Unexpected EOF");
}
return ((scratch[1... | java | int getShort(final long off) throws IOException, InterruptedException {
if (off < 0 || off > zipFileSlice.len - 2) {
throw new IndexOutOfBoundsException();
}
if (read(off, scratch, 0, 2) < 2) {
throw new EOFException("Unexpected EOF");
}
return ((scratch[1... | [
"int",
"getShort",
"(",
"final",
"long",
"off",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"if",
"(",
"off",
"<",
"0",
"||",
"off",
">",
"zipFileSlice",
".",
"len",
"-",
"2",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
... | Get a short from the zipfile slice.
@param off
the offset to start reading from
@return the short
@throws IOException
if an I/O exception occurs.
@throws InterruptedException
if the thread was interrupted. | [
"Get",
"a",
"short",
"from",
"the",
"zipfile",
"slice",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java#L173-L181 |
62,944 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java | ZipFileSliceReader.getInt | static int getInt(final byte[] arr, final long off) throws IOException {
final int ioff = (int) off;
if (ioff < 0 || ioff > arr.length - 4) {
throw new IndexOutOfBoundsException();
}
return ((arr[ioff + 3] & 0xff) << 24) //
| ((arr[ioff + 2] & 0xff) << 16) //
... | java | static int getInt(final byte[] arr, final long off) throws IOException {
final int ioff = (int) off;
if (ioff < 0 || ioff > arr.length - 4) {
throw new IndexOutOfBoundsException();
}
return ((arr[ioff + 3] & 0xff) << 24) //
| ((arr[ioff + 2] & 0xff) << 16) //
... | [
"static",
"int",
"getInt",
"(",
"final",
"byte",
"[",
"]",
"arr",
",",
"final",
"long",
"off",
")",
"throws",
"IOException",
"{",
"final",
"int",
"ioff",
"=",
"(",
"int",
")",
"off",
";",
"if",
"(",
"ioff",
"<",
"0",
"||",
"ioff",
">",
"arr",
"."... | Get an int from a byte array.
@param arr
the byte array
@param off
the offset to start reading from
@return the int
@throws IOException
if an I/O exception occurs. | [
"Get",
"an",
"int",
"from",
"a",
"byte",
"array",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java#L194-L203 |
62,945 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java | ZipFileSliceReader.getLong | static long getLong(final byte[] arr, final long off) throws IOException {
final int ioff = (int) off;
if (ioff < 0 || ioff > arr.length - 8) {
throw new IndexOutOfBoundsException();
}
return ((arr[ioff + 7] & 0xffL) << 56) //
| ((arr[ioff + 6] & 0xffL) << 48)... | java | static long getLong(final byte[] arr, final long off) throws IOException {
final int ioff = (int) off;
if (ioff < 0 || ioff > arr.length - 8) {
throw new IndexOutOfBoundsException();
}
return ((arr[ioff + 7] & 0xffL) << 56) //
| ((arr[ioff + 6] & 0xffL) << 48)... | [
"static",
"long",
"getLong",
"(",
"final",
"byte",
"[",
"]",
"arr",
",",
"final",
"long",
"off",
")",
"throws",
"IOException",
"{",
"final",
"int",
"ioff",
"=",
"(",
"int",
")",
"off",
";",
"if",
"(",
"ioff",
"<",
"0",
"||",
"ioff",
">",
"arr",
"... | Get a long from a byte array.
@param arr
the byte array
@param off
the offset to start reading from
@return the long
@throws IOException
if an I/O exception occurs. | [
"Get",
"a",
"long",
"from",
"a",
"byte",
"array",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java#L240-L253 |
62,946 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java | ZipFileSliceReader.getLong | long getLong(final long off) throws IOException, InterruptedException {
if (off < 0 || off > zipFileSlice.len - 8) {
throw new IndexOutOfBoundsException();
}
if (read(off, scratch, 0, 8) < 8) {
throw new EOFException("Unexpected EOF");
}
return ((scratch[7... | java | long getLong(final long off) throws IOException, InterruptedException {
if (off < 0 || off > zipFileSlice.len - 8) {
throw new IndexOutOfBoundsException();
}
if (read(off, scratch, 0, 8) < 8) {
throw new EOFException("Unexpected EOF");
}
return ((scratch[7... | [
"long",
"getLong",
"(",
"final",
"long",
"off",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"if",
"(",
"off",
"<",
"0",
"||",
"off",
">",
"zipFileSlice",
".",
"len",
"-",
"8",
")",
"{",
"throw",
"new",
"IndexOutOfBoundsException",
"(",
... | Get a long from the zipfile slice.
@param off
the offset to start reading from
@return the long
@throws IOException
if an I/O exception occurs.
@throws InterruptedException
if the thread was interrupted. | [
"Get",
"a",
"long",
"from",
"the",
"zipfile",
"slice",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java#L266-L281 |
62,947 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java | ZipFileSliceReader.getString | static String getString(final byte[] arr, final long off, final int lenBytes) throws IOException {
final int ioff = (int) off;
if (ioff < 0 || ioff > arr.length - lenBytes) {
throw new IndexOutOfBoundsException();
}
return new String(arr, ioff, lenBytes, StandardCharsets.UTF_... | java | static String getString(final byte[] arr, final long off, final int lenBytes) throws IOException {
final int ioff = (int) off;
if (ioff < 0 || ioff > arr.length - lenBytes) {
throw new IndexOutOfBoundsException();
}
return new String(arr, ioff, lenBytes, StandardCharsets.UTF_... | [
"static",
"String",
"getString",
"(",
"final",
"byte",
"[",
"]",
"arr",
",",
"final",
"long",
"off",
",",
"final",
"int",
"lenBytes",
")",
"throws",
"IOException",
"{",
"final",
"int",
"ioff",
"=",
"(",
"int",
")",
"off",
";",
"if",
"(",
"ioff",
"<",... | Get a string from a byte array.
@param arr
the byte array
@param off
the offset to start reading from
@param lenBytes
the length of the string in bytes
@return the string
@throws IOException
if an I/O exception occurs. | [
"Get",
"a",
"string",
"from",
"a",
"byte",
"array",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java#L296-L302 |
62,948 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java | ZipFileSliceReader.getString | String getString(final long off, final int lenBytes) throws IOException, InterruptedException {
if (off < 0 || off > zipFileSlice.len - lenBytes) {
throw new IndexOutOfBoundsException();
}
final byte[] scratchToUse = lenBytes <= scratch.length ? scratch : new byte[lenBytes];
... | java | String getString(final long off, final int lenBytes) throws IOException, InterruptedException {
if (off < 0 || off > zipFileSlice.len - lenBytes) {
throw new IndexOutOfBoundsException();
}
final byte[] scratchToUse = lenBytes <= scratch.length ? scratch : new byte[lenBytes];
... | [
"String",
"getString",
"(",
"final",
"long",
"off",
",",
"final",
"int",
"lenBytes",
")",
"throws",
"IOException",
",",
"InterruptedException",
"{",
"if",
"(",
"off",
"<",
"0",
"||",
"off",
">",
"zipFileSlice",
".",
"len",
"-",
"lenBytes",
")",
"{",
"thr... | Get a string from the zipfile slice.
@param off
the offset to start reading from
@param lenBytes
the length of the string in bytes
@return the string
@throws IOException
if an I/O exception occurs.
@throws InterruptedException
if the thread was interrupted. | [
"Get",
"a",
"string",
"from",
"the",
"zipfile",
"slice",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/ZipFileSliceReader.java#L317-L328 |
62,949 | classgraph/classgraph | src/main/java/io/github/classgraph/ReferenceTypeSignature.java | ReferenceTypeSignature.parseReferenceTypeSignature | static ReferenceTypeSignature parseReferenceTypeSignature(final Parser parser, final String definingClassName)
throws ParseException {
final ClassRefTypeSignature classTypeSignature = ClassRefTypeSignature.parse(parser, definingClassName);
if (classTypeSignature != null) {
return... | java | static ReferenceTypeSignature parseReferenceTypeSignature(final Parser parser, final String definingClassName)
throws ParseException {
final ClassRefTypeSignature classTypeSignature = ClassRefTypeSignature.parse(parser, definingClassName);
if (classTypeSignature != null) {
return... | [
"static",
"ReferenceTypeSignature",
"parseReferenceTypeSignature",
"(",
"final",
"Parser",
"parser",
",",
"final",
"String",
"definingClassName",
")",
"throws",
"ParseException",
"{",
"final",
"ClassRefTypeSignature",
"classTypeSignature",
"=",
"ClassRefTypeSignature",
".",
... | Parse a reference type signature.
@param parser
The parser
@param definingClassName
The class containing the type descriptor.
@return The parsed type reference type signature.
@throws ParseException
If the type signature could not be parsed. | [
"Parse",
"a",
"reference",
"type",
"signature",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ReferenceTypeSignature.java#L55-L70 |
62,950 | classgraph/classgraph | src/main/java/io/github/classgraph/ReferenceTypeSignature.java | ReferenceTypeSignature.parseClassBound | static ReferenceTypeSignature parseClassBound(final Parser parser, final String definingClassName)
throws ParseException {
parser.expect(':');
// May return null if there is no signature after ':' (class bound signature may be empty)
return parseReferenceTypeSignature(parser, definin... | java | static ReferenceTypeSignature parseClassBound(final Parser parser, final String definingClassName)
throws ParseException {
parser.expect(':');
// May return null if there is no signature after ':' (class bound signature may be empty)
return parseReferenceTypeSignature(parser, definin... | [
"static",
"ReferenceTypeSignature",
"parseClassBound",
"(",
"final",
"Parser",
"parser",
",",
"final",
"String",
"definingClassName",
")",
"throws",
"ParseException",
"{",
"parser",
".",
"expect",
"(",
"'",
"'",
")",
";",
"// May return null if there is no signature aft... | Parse a class bound.
@param parser
The parser.
@param definingClassName
The class containing the type descriptor.
@return The parsed class bound.
@throws ParseException
If the type signature could not be parsed. | [
"Parse",
"a",
"class",
"bound",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ReferenceTypeSignature.java#L83-L88 |
62,951 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/utils/FileUtils.java | FileUtils.isClassfile | public static boolean isClassfile(final String path) {
final int len = path.length();
return len > 6 && path.regionMatches(true, len - 6, ".class", 0, 6);
} | java | public static boolean isClassfile(final String path) {
final int len = path.length();
return len > 6 && path.regionMatches(true, len - 6, ".class", 0, 6);
} | [
"public",
"static",
"boolean",
"isClassfile",
"(",
"final",
"String",
"path",
")",
"{",
"final",
"int",
"len",
"=",
"path",
".",
"length",
"(",
")",
";",
"return",
"len",
">",
"6",
"&&",
"path",
".",
"regionMatches",
"(",
"true",
",",
"len",
"-",
"6"... | Check if the path ends with a ".class" extension, ignoring case.
@param path
A file path.
@return true if path has a ".class" extension, ignoring case. | [
"Check",
"if",
"the",
"path",
"ends",
"with",
"a",
".",
"class",
"extension",
"ignoring",
"case",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/utils/FileUtils.java#L398-L401 |
62,952 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/utils/FileUtils.java | FileUtils.getParentDirPath | public static String getParentDirPath(final String path, final char separator) {
final int lastSlashIdx = path.lastIndexOf(separator);
if (lastSlashIdx <= 0) {
return "";
}
return path.substring(0, lastSlashIdx);
} | java | public static String getParentDirPath(final String path, final char separator) {
final int lastSlashIdx = path.lastIndexOf(separator);
if (lastSlashIdx <= 0) {
return "";
}
return path.substring(0, lastSlashIdx);
} | [
"public",
"static",
"String",
"getParentDirPath",
"(",
"final",
"String",
"path",
",",
"final",
"char",
"separator",
")",
"{",
"final",
"int",
"lastSlashIdx",
"=",
"path",
".",
"lastIndexOf",
"(",
"separator",
")",
";",
"if",
"(",
"lastSlashIdx",
"<=",
"0",
... | Get the parent dir path.
@param path
the path
@param separator
the separator
@return the parent dir path | [
"Get",
"the",
"parent",
"dir",
"path",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/utils/FileUtils.java#L431-L437 |
62,953 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/utils/ReflectionUtils.java | ReflectionUtils.getStaticFieldVal | public static Object getStaticFieldVal(final Class<?> cls, final String fieldName, final boolean throwException)
throws IllegalArgumentException {
if (cls == null || fieldName == null) {
if (throwException) {
throw new NullPointerException();
} else {
... | java | public static Object getStaticFieldVal(final Class<?> cls, final String fieldName, final boolean throwException)
throws IllegalArgumentException {
if (cls == null || fieldName == null) {
if (throwException) {
throw new NullPointerException();
} else {
... | [
"public",
"static",
"Object",
"getStaticFieldVal",
"(",
"final",
"Class",
"<",
"?",
">",
"cls",
",",
"final",
"String",
"fieldName",
",",
"final",
"boolean",
"throwException",
")",
"throws",
"IllegalArgumentException",
"{",
"if",
"(",
"cls",
"==",
"null",
"||"... | Get the value of the named static field in the given class or any of its superclasses. If an exception is
thrown while trying to read the field value, and throwException is true, then IllegalArgumentException is
thrown wrapping the cause, otherwise this will return null. If passed a null class reference, returns null
u... | [
"Get",
"the",
"value",
"of",
"the",
"named",
"static",
"field",
"in",
"the",
"given",
"class",
"or",
"any",
"of",
"its",
"superclasses",
".",
"If",
"an",
"exception",
"is",
"thrown",
"while",
"trying",
"to",
"read",
"the",
"field",
"value",
"and",
"throw... | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/utils/ReflectionUtils.java#L151-L161 |
62,954 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classloaderhandler/FelixClassLoaderHandler.java | FelixClassLoaderHandler.getContentLocation | private static String getContentLocation(final Object content) {
final File file = (File) ReflectionUtils.invokeMethod(content, "getFile", false);
return file != null ? file.toURI().toString() : null;
} | java | private static String getContentLocation(final Object content) {
final File file = (File) ReflectionUtils.invokeMethod(content, "getFile", false);
return file != null ? file.toURI().toString() : null;
} | [
"private",
"static",
"String",
"getContentLocation",
"(",
"final",
"Object",
"content",
")",
"{",
"final",
"File",
"file",
"=",
"(",
"File",
")",
"ReflectionUtils",
".",
"invokeMethod",
"(",
"content",
",",
"\"getFile\"",
",",
"false",
")",
";",
"return",
"f... | Get the content location.
@param content
the content object
@return the content location | [
"Get",
"the",
"content",
"location",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classloaderhandler/FelixClassLoaderHandler.java#L90-L93 |
62,955 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classloaderhandler/FelixClassLoaderHandler.java | FelixClassLoaderHandler.addBundle | private static void addBundle(final Object bundleWiring, final ClassLoader classLoader,
final ClasspathOrder classpathOrderOut, final Set<Object> bundles, final ScanSpec scanSpec,
final LogNode log) {
// Track the bundles we've processed to prevent loops
bundles.add(bundleWiring)... | java | private static void addBundle(final Object bundleWiring, final ClassLoader classLoader,
final ClasspathOrder classpathOrderOut, final Set<Object> bundles, final ScanSpec scanSpec,
final LogNode log) {
// Track the bundles we've processed to prevent loops
bundles.add(bundleWiring)... | [
"private",
"static",
"void",
"addBundle",
"(",
"final",
"Object",
"bundleWiring",
",",
"final",
"ClassLoader",
"classLoader",
",",
"final",
"ClasspathOrder",
"classpathOrderOut",
",",
"final",
"Set",
"<",
"Object",
">",
"bundles",
",",
"final",
"ScanSpec",
"scanSp... | Adds the bundle.
@param bundleWiring
the bundle wiring
@param classLoader
the classloader
@param classpathOrderOut
the classpath order out
@param bundles
the bundles
@param scanSpec
the scan spec
@param log
the log | [
"Adds",
"the",
"bundle",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classloaderhandler/FelixClassLoaderHandler.java#L111-L140 |
62,956 | classgraph/classgraph | src/main/java/io/github/classgraph/AnnotationParameterValue.java | AnnotationParameterValue.toStringParamValueOnly | void toStringParamValueOnly(final StringBuilder buf) {
if (value == null) {
buf.append("null");
} else {
final Object paramVal = value.get();
final Class<?> valClass = paramVal.getClass();
if (valClass.isArray()) {
buf.append('[');
... | java | void toStringParamValueOnly(final StringBuilder buf) {
if (value == null) {
buf.append("null");
} else {
final Object paramVal = value.get();
final Class<?> valClass = paramVal.getClass();
if (valClass.isArray()) {
buf.append('[');
... | [
"void",
"toStringParamValueOnly",
"(",
"final",
"StringBuilder",
"buf",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"buf",
".",
"append",
"(",
"\"null\"",
")",
";",
"}",
"else",
"{",
"final",
"Object",
"paramVal",
"=",
"value",
".",
"get",
"(... | To string, param value only.
@param buf
the buf | [
"To",
"string",
"param",
"value",
"only",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/AnnotationParameterValue.java#L206-L234 |
62,957 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classpath/SystemJarFinder.java | SystemJarFinder.addJREPath | private static boolean addJREPath(final File dir) {
if (dir != null && !dir.getPath().isEmpty() && FileUtils.canRead(dir) && dir.isDirectory()) {
final File[] dirFiles = dir.listFiles();
if (dirFiles != null) {
for (final File file : dirFiles) {
final ... | java | private static boolean addJREPath(final File dir) {
if (dir != null && !dir.getPath().isEmpty() && FileUtils.canRead(dir) && dir.isDirectory()) {
final File[] dirFiles = dir.listFiles();
if (dirFiles != null) {
for (final File file : dirFiles) {
final ... | [
"private",
"static",
"boolean",
"addJREPath",
"(",
"final",
"File",
"dir",
")",
"{",
"if",
"(",
"dir",
"!=",
"null",
"&&",
"!",
"dir",
".",
"getPath",
"(",
")",
".",
"isEmpty",
"(",
")",
"&&",
"FileUtils",
".",
"canRead",
"(",
"dir",
")",
"&&",
"di... | Add and search a JRE path.
@param dir
the JRE directory
@return true if the directory was readable. | [
"Add",
"and",
"search",
"a",
"JRE",
"path",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classpath/SystemJarFinder.java#L66-L96 |
62,958 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/LogicalZipFile.java | LogicalZipFile.getManifestValue | private static Entry<String, Integer> getManifestValue(final byte[] manifest, final int startIdx) {
// See if manifest entry is split across multiple lines
int curr = startIdx;
final int len = manifest.length;
while (curr < len && manifest[curr] == (byte) ' ') {
// Skip initi... | java | private static Entry<String, Integer> getManifestValue(final byte[] manifest, final int startIdx) {
// See if manifest entry is split across multiple lines
int curr = startIdx;
final int len = manifest.length;
while (curr < len && manifest[curr] == (byte) ' ') {
// Skip initi... | [
"private",
"static",
"Entry",
"<",
"String",
",",
"Integer",
">",
"getManifestValue",
"(",
"final",
"byte",
"[",
"]",
"manifest",
",",
"final",
"int",
"startIdx",
")",
"{",
"// See if manifest entry is split across multiple lines",
"int",
"curr",
"=",
"startIdx",
... | Extract a value from the manifest, and return the value as a string, along with the index after the
terminating newline. Manifest files support three different line terminator types, and entries can be split
across lines with a line terminator followed by a space.
@param manifest
the manifest bytes
@param startIdx
the... | [
"Extract",
"a",
"value",
"from",
"the",
"manifest",
"and",
"return",
"the",
"value",
"as",
"a",
"string",
"along",
"with",
"the",
"index",
"after",
"the",
"terminating",
"newline",
".",
"Manifest",
"files",
"support",
"three",
"different",
"line",
"terminator"... | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/LogicalZipFile.java#L170-L231 |
62,959 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/LogicalZipFile.java | LogicalZipFile.manifestKeyToBytes | private static byte[] manifestKeyToBytes(final String key) {
final byte[] bytes = new byte[key.length()];
for (int i = 0; i < key.length(); i++) {
bytes[i] = (byte) Character.toLowerCase(key.charAt(i));
}
return bytes;
} | java | private static byte[] manifestKeyToBytes(final String key) {
final byte[] bytes = new byte[key.length()];
for (int i = 0; i < key.length(); i++) {
bytes[i] = (byte) Character.toLowerCase(key.charAt(i));
}
return bytes;
} | [
"private",
"static",
"byte",
"[",
"]",
"manifestKeyToBytes",
"(",
"final",
"String",
"key",
")",
"{",
"final",
"byte",
"[",
"]",
"bytes",
"=",
"new",
"byte",
"[",
"key",
".",
"length",
"(",
")",
"]",
";",
"for",
"(",
"int",
"i",
"=",
"0",
";",
"i... | Manifest key to bytes.
@param key
the manifest key
@return the manifest key bytes, lowercased. | [
"Manifest",
"key",
"to",
"bytes",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/LogicalZipFile.java#L240-L246 |
62,960 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/fastzipfilereader/LogicalZipFile.java | LogicalZipFile.keyMatchesAtPosition | private static boolean keyMatchesAtPosition(final byte[] manifest, final byte[] key, final int pos) {
if (pos + key.length + 1 > manifest.length || manifest[pos + key.length] != ':') {
return false;
}
for (int i = 0; i < key.length; i++) {
// Manifest keys are case insens... | java | private static boolean keyMatchesAtPosition(final byte[] manifest, final byte[] key, final int pos) {
if (pos + key.length + 1 > manifest.length || manifest[pos + key.length] != ':') {
return false;
}
for (int i = 0; i < key.length; i++) {
// Manifest keys are case insens... | [
"private",
"static",
"boolean",
"keyMatchesAtPosition",
"(",
"final",
"byte",
"[",
"]",
"manifest",
",",
"final",
"byte",
"[",
"]",
"key",
",",
"final",
"int",
"pos",
")",
"{",
"if",
"(",
"pos",
"+",
"key",
".",
"length",
"+",
"1",
">",
"manifest",
"... | Key matches at position.
@param manifest
the manifest
@param key
the key
@param pos
the position to try matching
@return true if the key matches at this position | [
"Key",
"matches",
"at",
"position",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/fastzipfilereader/LogicalZipFile.java#L259-L270 |
62,961 | classgraph/classgraph | src/main/java/io/github/classgraph/ClasspathElementModule.java | ClasspathElementModule.getModuleName | @Override
public String getModuleName() {
String moduleName = moduleRef.getName();
if (moduleName == null || moduleName.isEmpty()) {
moduleName = moduleNameFromModuleDescriptor;
}
return moduleName == null || moduleName.isEmpty() ? null : moduleName;
} | java | @Override
public String getModuleName() {
String moduleName = moduleRef.getName();
if (moduleName == null || moduleName.isEmpty()) {
moduleName = moduleNameFromModuleDescriptor;
}
return moduleName == null || moduleName.isEmpty() ? null : moduleName;
} | [
"@",
"Override",
"public",
"String",
"getModuleName",
"(",
")",
"{",
"String",
"moduleName",
"=",
"moduleRef",
".",
"getName",
"(",
")",
";",
"if",
"(",
"moduleName",
"==",
"null",
"||",
"moduleName",
".",
"isEmpty",
"(",
")",
")",
"{",
"moduleName",
"="... | Get the module name from the module reference or the module descriptor.
@return the module name, or null if the module does not have a name. | [
"Get",
"the",
"module",
"name",
"from",
"the",
"module",
"reference",
"or",
"the",
"module",
"descriptor",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClasspathElementModule.java#L348-L355 |
62,962 | classgraph/classgraph | src/main/java/io/github/classgraph/PackageInfo.java | PackageInfo.addAnnotations | void addAnnotations(final AnnotationInfoList packageAnnotations) {
// Currently only class annotations are used in the package-info.class file
if (packageAnnotations != null && !packageAnnotations.isEmpty()) {
if (this.annotationInfo == null) {
this.annotationInfo = new Annot... | java | void addAnnotations(final AnnotationInfoList packageAnnotations) {
// Currently only class annotations are used in the package-info.class file
if (packageAnnotations != null && !packageAnnotations.isEmpty()) {
if (this.annotationInfo == null) {
this.annotationInfo = new Annot... | [
"void",
"addAnnotations",
"(",
"final",
"AnnotationInfoList",
"packageAnnotations",
")",
"{",
"// Currently only class annotations are used in the package-info.class file",
"if",
"(",
"packageAnnotations",
"!=",
"null",
"&&",
"!",
"packageAnnotations",
".",
"isEmpty",
"(",
")... | Add annotations found in a package descriptor classfile.
@param packageAnnotations
the package annotations | [
"Add",
"annotations",
"found",
"in",
"a",
"package",
"descriptor",
"classfile",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/PackageInfo.java#L91-L100 |
62,963 | classgraph/classgraph | src/main/java/io/github/classgraph/PackageInfo.java | PackageInfo.getChildren | public PackageInfoList getChildren() {
if (children == null) {
return PackageInfoList.EMPTY_LIST;
}
final PackageInfoList childrenSorted = new PackageInfoList(children);
// Ensure children are sorted
CollectionUtils.sortIfNotEmpty(childrenSorted, new Comparator<Packag... | java | public PackageInfoList getChildren() {
if (children == null) {
return PackageInfoList.EMPTY_LIST;
}
final PackageInfoList childrenSorted = new PackageInfoList(children);
// Ensure children are sorted
CollectionUtils.sortIfNotEmpty(childrenSorted, new Comparator<Packag... | [
"public",
"PackageInfoList",
"getChildren",
"(",
")",
"{",
"if",
"(",
"children",
"==",
"null",
")",
"{",
"return",
"PackageInfoList",
".",
"EMPTY_LIST",
";",
"}",
"final",
"PackageInfoList",
"childrenSorted",
"=",
"new",
"PackageInfoList",
"(",
"children",
")",... | The child packages of this package, or the empty list if none.
@return the child packages, or the empty list if none. | [
"The",
"child",
"packages",
"of",
"this",
"package",
"or",
"the",
"empty",
"list",
"if",
"none",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/PackageInfo.java#L166-L179 |
62,964 | classgraph/classgraph | src/main/java/io/github/classgraph/PackageInfo.java | PackageInfo.getParentPackageName | static String getParentPackageName(final String packageOrClassName) {
if (packageOrClassName.isEmpty()) {
return null;
}
final int lastDotIdx = packageOrClassName.lastIndexOf('.');
return lastDotIdx < 0 ? "" : packageOrClassName.substring(0, lastDotIdx);
} | java | static String getParentPackageName(final String packageOrClassName) {
if (packageOrClassName.isEmpty()) {
return null;
}
final int lastDotIdx = packageOrClassName.lastIndexOf('.');
return lastDotIdx < 0 ? "" : packageOrClassName.substring(0, lastDotIdx);
} | [
"static",
"String",
"getParentPackageName",
"(",
"final",
"String",
"packageOrClassName",
")",
"{",
"if",
"(",
"packageOrClassName",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"null",
";",
"}",
"final",
"int",
"lastDotIdx",
"=",
"packageOrClassName",
".",
"... | Get the name of the parent package of a parent, or the package of the named class.
@param packageOrClassName
The package or class name.
@return the parent package, or the package of the named class, or null if packageOrClassName is the root
package (""). | [
"Get",
"the",
"name",
"of",
"the",
"parent",
"package",
"of",
"a",
"parent",
"or",
"the",
"package",
"of",
"the",
"named",
"class",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/PackageInfo.java#L239-L245 |
62,965 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/types/Parser.java | Parser.getPositionInfo | public String getPositionInfo() {
final int showStart = Math.max(0, position - SHOW_BEFORE);
final int showEnd = Math.min(string.length(), position + SHOW_AFTER);
return "before: \"" + JSONUtils.escapeJSONString(string.substring(showStart, position)) + "\"; after: \""
+ JSONUtils... | java | public String getPositionInfo() {
final int showStart = Math.max(0, position - SHOW_BEFORE);
final int showEnd = Math.min(string.length(), position + SHOW_AFTER);
return "before: \"" + JSONUtils.escapeJSONString(string.substring(showStart, position)) + "\"; after: \""
+ JSONUtils... | [
"public",
"String",
"getPositionInfo",
"(",
")",
"{",
"final",
"int",
"showStart",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"position",
"-",
"SHOW_BEFORE",
")",
";",
"final",
"int",
"showEnd",
"=",
"Math",
".",
"min",
"(",
"string",
".",
"length",
"(",
... | Get the parsing context as a string, for debugging.
@return A string showing parsing context, for debugging. | [
"Get",
"the",
"parsing",
"context",
"as",
"a",
"string",
"for",
"debugging",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/types/Parser.java#L75-L81 |
62,966 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/types/Parser.java | Parser.expect | public void expect(final char expectedChar) throws ParseException {
final int next = getc();
if (next != expectedChar) {
throw new ParseException(this, "Expected '" + expectedChar + "'; got '" + (char) next + "'");
}
} | java | public void expect(final char expectedChar) throws ParseException {
final int next = getc();
if (next != expectedChar) {
throw new ParseException(this, "Expected '" + expectedChar + "'; got '" + (char) next + "'");
}
} | [
"public",
"void",
"expect",
"(",
"final",
"char",
"expectedChar",
")",
"throws",
"ParseException",
"{",
"final",
"int",
"next",
"=",
"getc",
"(",
")",
";",
"if",
"(",
"next",
"!=",
"expectedChar",
")",
"{",
"throw",
"new",
"ParseException",
"(",
"this",
... | Expect the next character.
@param expectedChar
The expected character.
@throws ParseException
If the next character was not the expected character. | [
"Expect",
"the",
"next",
"character",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/types/Parser.java#L127-L132 |
62,967 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/types/Parser.java | Parser.skipWhitespace | public void skipWhitespace() {
while (position < string.length()) {
final char c = string.charAt(position);
if (c == ' ' || c == '\n' || c == '\r' || c == '\t') {
position++;
} else {
break;
}
}
} | java | public void skipWhitespace() {
while (position < string.length()) {
final char c = string.charAt(position);
if (c == ' ' || c == '\n' || c == '\r' || c == '\t') {
position++;
} else {
break;
}
}
} | [
"public",
"void",
"skipWhitespace",
"(",
")",
"{",
"while",
"(",
"position",
"<",
"string",
".",
"length",
"(",
")",
")",
"{",
"final",
"char",
"c",
"=",
"string",
".",
"charAt",
"(",
"position",
")",
";",
"if",
"(",
"c",
"==",
"'",
"'",
"||",
"c... | Skip whitespace starting at the current position. | [
"Skip",
"whitespace",
"starting",
"at",
"the",
"current",
"position",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/types/Parser.java#L277-L286 |
62,968 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/json/JSONObject.java | JSONObject.toJSONString | void toJSONString(final Map<ReferenceEqualityKey<JSONReference>, CharSequence> jsonReferenceToId,
final boolean includeNullValuedFields, final int depth, final int indentWidth,
final StringBuilder buf) {
final boolean prettyPrint = indentWidth > 0;
final int n = items.size();
... | java | void toJSONString(final Map<ReferenceEqualityKey<JSONReference>, CharSequence> jsonReferenceToId,
final boolean includeNullValuedFields, final int depth, final int indentWidth,
final StringBuilder buf) {
final boolean prettyPrint = indentWidth > 0;
final int n = items.size();
... | [
"void",
"toJSONString",
"(",
"final",
"Map",
"<",
"ReferenceEqualityKey",
"<",
"JSONReference",
">",
",",
"CharSequence",
">",
"jsonReferenceToId",
",",
"final",
"boolean",
"includeNullValuedFields",
",",
"final",
"int",
"depth",
",",
"final",
"int",
"indentWidth",
... | Serialize this JSONObject to a string.
@param jsonReferenceToId
a map from json reference to id
@param includeNullValuedFields
if true, include null valued fields
@param depth
the nesting depth
@param indentWidth
the indent width
@param buf
the buf | [
"Serialize",
"this",
"JSONObject",
"to",
"a",
"string",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/json/JSONObject.java#L78-L147 |
62,969 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classloaderhandler/JBossClassLoaderHandler.java | JBossClassLoaderHandler.handleResourceLoader | private static void handleResourceLoader(final Object resourceLoader, final ClassLoader classLoader,
final ClasspathOrder classpathOrderOut, final ScanSpec scanSpec, final LogNode log) {
if (resourceLoader == null) {
return;
}
// PathResourceLoader has root field, which i... | java | private static void handleResourceLoader(final Object resourceLoader, final ClassLoader classLoader,
final ClasspathOrder classpathOrderOut, final ScanSpec scanSpec, final LogNode log) {
if (resourceLoader == null) {
return;
}
// PathResourceLoader has root field, which i... | [
"private",
"static",
"void",
"handleResourceLoader",
"(",
"final",
"Object",
"resourceLoader",
",",
"final",
"ClassLoader",
"classLoader",
",",
"final",
"ClasspathOrder",
"classpathOrderOut",
",",
"final",
"ScanSpec",
"scanSpec",
",",
"final",
"LogNode",
"log",
")",
... | Handle a resource loader.
@param resourceLoader
the resource loader
@param classLoader
the classloader
@param classpathOrderOut
the classpath order
@param scanSpec
the scan spec
@param log
the log | [
"Handle",
"a",
"resource",
"loader",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classloaderhandler/JBossClassLoaderHandler.java#L97-L145 |
62,970 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classloaderhandler/JBossClassLoaderHandler.java | JBossClassLoaderHandler.handleRealModule | private static void handleRealModule(final Object module, final Set<Object> visitedModules,
final ClassLoader classLoader, final ClasspathOrder classpathOrderOut, final ScanSpec scanSpec,
final LogNode log) {
if (!visitedModules.add(module)) {
// Avoid extracting paths from t... | java | private static void handleRealModule(final Object module, final Set<Object> visitedModules,
final ClassLoader classLoader, final ClasspathOrder classpathOrderOut, final ScanSpec scanSpec,
final LogNode log) {
if (!visitedModules.add(module)) {
// Avoid extracting paths from t... | [
"private",
"static",
"void",
"handleRealModule",
"(",
"final",
"Object",
"module",
",",
"final",
"Set",
"<",
"Object",
">",
"visitedModules",
",",
"final",
"ClassLoader",
"classLoader",
",",
"final",
"ClasspathOrder",
"classpathOrderOut",
",",
"final",
"ScanSpec",
... | Handle a module.
@param module
the module
@param visitedModules
visited modules
@param classLoader
the classloader
@param classpathOrderOut
the classpath order
@param scanSpec
the scan spec
@param log
the log | [
"Handle",
"a",
"module",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classloaderhandler/JBossClassLoaderHandler.java#L163-L189 |
62,971 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/WhiteBlackList.java | WhiteBlackList.matchesPatternList | private static boolean matchesPatternList(final String str, final List<Pattern> patterns) {
if (patterns != null) {
for (final Pattern pattern : patterns) {
if (pattern.matcher(str).matches()) {
return true;
}
}
}
return... | java | private static boolean matchesPatternList(final String str, final List<Pattern> patterns) {
if (patterns != null) {
for (final Pattern pattern : patterns) {
if (pattern.matcher(str).matches()) {
return true;
}
}
}
return... | [
"private",
"static",
"boolean",
"matchesPatternList",
"(",
"final",
"String",
"str",
",",
"final",
"List",
"<",
"Pattern",
">",
"patterns",
")",
"{",
"if",
"(",
"patterns",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
"Pattern",
"pattern",
":",
"patterns",... | Check if a string matches one of the patterns in the provided list.
@param str
the string to test
@param patterns
the patterns
@return true, if successful | [
"Check",
"if",
"a",
"string",
"matches",
"one",
"of",
"the",
"patterns",
"in",
"the",
"provided",
"list",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/WhiteBlackList.java#L578-L587 |
62,972 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/WhiteBlackList.java | WhiteBlackList.quoteList | private static void quoteList(final Collection<String> coll, final StringBuilder buf) {
buf.append('[');
boolean first = true;
for (final String item : coll) {
if (first) {
first = false;
} else {
buf.append(", ");
}
... | java | private static void quoteList(final Collection<String> coll, final StringBuilder buf) {
buf.append('[');
boolean first = true;
for (final String item : coll) {
if (first) {
first = false;
} else {
buf.append(", ");
}
... | [
"private",
"static",
"void",
"quoteList",
"(",
"final",
"Collection",
"<",
"String",
">",
"coll",
",",
"final",
"StringBuilder",
"buf",
")",
"{",
"buf",
".",
"append",
"(",
"'",
"'",
")",
";",
"boolean",
"first",
"=",
"true",
";",
"for",
"(",
"final",
... | Quote list.
@param coll
the coll
@param buf
the buf | [
"Quote",
"list",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/WhiteBlackList.java#L661-L682 |
62,973 | classgraph/classgraph | src/main/java/io/github/classgraph/ClasspathElementZip.java | ClasspathElementZip.getModuleName | @Override
public String getModuleName() {
String moduleName = moduleNameFromModuleDescriptor;
if (moduleName == null || moduleName.isEmpty()) {
moduleName = moduleNameFromManifestFile;
}
if (moduleName == null || moduleName.isEmpty()) {
if (derivedAutomaticMod... | java | @Override
public String getModuleName() {
String moduleName = moduleNameFromModuleDescriptor;
if (moduleName == null || moduleName.isEmpty()) {
moduleName = moduleNameFromManifestFile;
}
if (moduleName == null || moduleName.isEmpty()) {
if (derivedAutomaticMod... | [
"@",
"Override",
"public",
"String",
"getModuleName",
"(",
")",
"{",
"String",
"moduleName",
"=",
"moduleNameFromModuleDescriptor",
";",
"if",
"(",
"moduleName",
"==",
"null",
"||",
"moduleName",
".",
"isEmpty",
"(",
")",
")",
"{",
"moduleName",
"=",
"moduleNa... | Get module name from module descriptor, or get the automatic module name from the manifest file, or derive an
automatic module name from the jar name.
@return the module name | [
"Get",
"module",
"name",
"from",
"module",
"descriptor",
"or",
"get",
"the",
"automatic",
"module",
"name",
"from",
"the",
"manifest",
"file",
"or",
"derive",
"an",
"automatic",
"module",
"name",
"from",
"the",
"jar",
"name",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClasspathElementZip.java#L513-L526 |
62,974 | classgraph/classgraph | src/main/java/io/github/classgraph/ClasspathElementZip.java | ClasspathElementZip.getZipFilePath | String getZipFilePath() {
return packageRootPrefix.isEmpty() ? zipFilePath
: zipFilePath + "!/" + packageRootPrefix.substring(0, packageRootPrefix.length() - 1);
} | java | String getZipFilePath() {
return packageRootPrefix.isEmpty() ? zipFilePath
: zipFilePath + "!/" + packageRootPrefix.substring(0, packageRootPrefix.length() - 1);
} | [
"String",
"getZipFilePath",
"(",
")",
"{",
"return",
"packageRootPrefix",
".",
"isEmpty",
"(",
")",
"?",
"zipFilePath",
":",
"zipFilePath",
"+",
"\"!/\"",
"+",
"packageRootPrefix",
".",
"substring",
"(",
"0",
",",
"packageRootPrefix",
".",
"length",
"(",
")",
... | Get the zipfile path.
@return the path of the zipfile, including any package root. | [
"Get",
"the",
"zipfile",
"path",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClasspathElementZip.java#L533-L536 |
62,975 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classpath/ClasspathOrder.java | ClasspathOrder.filter | private boolean filter(final String classpathElementPath) {
if (scanSpec.classpathElementFilters != null) {
for (final ClasspathElementFilter filter : scanSpec.classpathElementFilters) {
if (!filter.includeClasspathElement(classpathElementPath)) {
return false;
... | java | private boolean filter(final String classpathElementPath) {
if (scanSpec.classpathElementFilters != null) {
for (final ClasspathElementFilter filter : scanSpec.classpathElementFilters) {
if (!filter.includeClasspathElement(classpathElementPath)) {
return false;
... | [
"private",
"boolean",
"filter",
"(",
"final",
"String",
"classpathElementPath",
")",
"{",
"if",
"(",
"scanSpec",
".",
"classpathElementFilters",
"!=",
"null",
")",
"{",
"for",
"(",
"final",
"ClasspathElementFilter",
"filter",
":",
"scanSpec",
".",
"classpathElemen... | Test to see if a RelativePath has been filtered out by the user.
@param classpathElementPath
the classpath element path
@return true, if not filtered out | [
"Test",
"to",
"see",
"if",
"a",
"RelativePath",
"has",
"been",
"filtered",
"out",
"by",
"the",
"user",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classpath/ClasspathOrder.java#L93-L102 |
62,976 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classpath/ClasspathOrder.java | ClasspathOrder.addSystemClasspathEntry | boolean addSystemClasspathEntry(final String pathEntry, final ClassLoader classLoader) {
if (classpathEntryUniqueResolvedPaths.add(pathEntry)) {
order.add(new SimpleEntry<>(pathEntry, classLoader));
return true;
}
return false;
} | java | boolean addSystemClasspathEntry(final String pathEntry, final ClassLoader classLoader) {
if (classpathEntryUniqueResolvedPaths.add(pathEntry)) {
order.add(new SimpleEntry<>(pathEntry, classLoader));
return true;
}
return false;
} | [
"boolean",
"addSystemClasspathEntry",
"(",
"final",
"String",
"pathEntry",
",",
"final",
"ClassLoader",
"classLoader",
")",
"{",
"if",
"(",
"classpathEntryUniqueResolvedPaths",
".",
"add",
"(",
"pathEntry",
")",
")",
"{",
"order",
".",
"add",
"(",
"new",
"Simple... | Add a system classpath entry.
@param pathEntry
the system classpath entry -- the path string should already have been run through
FastPathResolver.resolve(FileUtils.CURR_DIR_PATH, path
@param classLoader
the classloader
@return true, if added and unique | [
"Add",
"a",
"system",
"classpath",
"entry",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classpath/ClasspathOrder.java#L114-L120 |
62,977 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classpath/ClasspathOrder.java | ClasspathOrder.addClasspathEntry | private boolean addClasspathEntry(final String pathEntry, final ClassLoader classLoader,
final ScanSpec scanSpec) {
if (scanSpec.overrideClasspath == null //
&& (SystemJarFinder.getJreLibOrExtJars().contains(pathEntry)
|| pathEntry.equals(SystemJarFinder.getJr... | java | private boolean addClasspathEntry(final String pathEntry, final ClassLoader classLoader,
final ScanSpec scanSpec) {
if (scanSpec.overrideClasspath == null //
&& (SystemJarFinder.getJreLibOrExtJars().contains(pathEntry)
|| pathEntry.equals(SystemJarFinder.getJr... | [
"private",
"boolean",
"addClasspathEntry",
"(",
"final",
"String",
"pathEntry",
",",
"final",
"ClassLoader",
"classLoader",
",",
"final",
"ScanSpec",
"scanSpec",
")",
"{",
"if",
"(",
"scanSpec",
".",
"overrideClasspath",
"==",
"null",
"//",
"&&",
"(",
"SystemJar... | Add a classpath entry.
@param pathEntry
the classpath entry -- the path string should already have been run through
FastPathResolver.resolve(FileUtils.CURR_DIR_PATH, path)
@param classLoader
the classloader
@param scanSpec
the scan spec
@return true, if added and unique | [
"Add",
"a",
"classpath",
"entry",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classpath/ClasspathOrder.java#L134-L148 |
62,978 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classpath/ClasspathOrder.java | ClasspathOrder.addClasspathEntries | public boolean addClasspathEntries(final String pathStr, final ClassLoader classLoader, final ScanSpec scanSpec,
final LogNode log) {
if (pathStr == null || pathStr.isEmpty()) {
return false;
} else {
final String[] parts = JarUtils.smartPathSplit(pathStr);
... | java | public boolean addClasspathEntries(final String pathStr, final ClassLoader classLoader, final ScanSpec scanSpec,
final LogNode log) {
if (pathStr == null || pathStr.isEmpty()) {
return false;
} else {
final String[] parts = JarUtils.smartPathSplit(pathStr);
... | [
"public",
"boolean",
"addClasspathEntries",
"(",
"final",
"String",
"pathStr",
",",
"final",
"ClassLoader",
"classLoader",
",",
"final",
"ScanSpec",
"scanSpec",
",",
"final",
"LogNode",
"log",
")",
"{",
"if",
"(",
"pathStr",
"==",
"null",
"||",
"pathStr",
".",... | Add classpath entries, separated by the system path separator character.
@param pathStr
the delimited string of URLs or paths of the classpath.
@param classLoader
the ClassLoader that this classpath was obtained from.
@param scanSpec
the scan spec
@param log
the LogNode instance to use if logging in verbose mode.
@ret... | [
"Add",
"classpath",
"entries",
"separated",
"by",
"the",
"system",
"path",
"separator",
"character",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classpath/ClasspathOrder.java#L288-L303 |
62,979 | classgraph/classgraph | src/main/java/io/github/classgraph/TypeArgument.java | TypeArgument.parse | private static TypeArgument parse(final Parser parser, final String definingClassName) throws ParseException {
final char peek = parser.peek();
if (peek == '*') {
parser.expect('*');
return new TypeArgument(Wildcard.ANY, null);
} else if (peek == '+') {
parser... | java | private static TypeArgument parse(final Parser parser, final String definingClassName) throws ParseException {
final char peek = parser.peek();
if (peek == '*') {
parser.expect('*');
return new TypeArgument(Wildcard.ANY, null);
} else if (peek == '+') {
parser... | [
"private",
"static",
"TypeArgument",
"parse",
"(",
"final",
"Parser",
"parser",
",",
"final",
"String",
"definingClassName",
")",
"throws",
"ParseException",
"{",
"final",
"char",
"peek",
"=",
"parser",
".",
"peek",
"(",
")",
";",
"if",
"(",
"peek",
"==",
... | Parse a type argument.
@param parser
The parser.
@param definingClassName
The name of the defining class (for resolving type variables).
@return The parsed method type signature.
@throws ParseException
If method type signature could not be parsed. | [
"Parse",
"a",
"type",
"argument",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/TypeArgument.java#L111-L140 |
62,980 | classgraph/classgraph | src/main/java/io/github/classgraph/TypeArgument.java | TypeArgument.parseList | static List<TypeArgument> parseList(final Parser parser, final String definingClassName) throws ParseException {
if (parser.peek() == '<') {
parser.expect('<');
final List<TypeArgument> typeArguments = new ArrayList<>(2);
while (parser.peek() != '>') {
if (!pa... | java | static List<TypeArgument> parseList(final Parser parser, final String definingClassName) throws ParseException {
if (parser.peek() == '<') {
parser.expect('<');
final List<TypeArgument> typeArguments = new ArrayList<>(2);
while (parser.peek() != '>') {
if (!pa... | [
"static",
"List",
"<",
"TypeArgument",
">",
"parseList",
"(",
"final",
"Parser",
"parser",
",",
"final",
"String",
"definingClassName",
")",
"throws",
"ParseException",
"{",
"if",
"(",
"parser",
".",
"peek",
"(",
")",
"==",
"'",
"'",
")",
"{",
"parser",
... | Parse a list of type arguments.
@param parser
The parser.
@param definingClassName
The name of the defining class (for resolving type variables).
@return The list of type arguments.
@throws ParseException
If type signature could not be parsed. | [
"Parse",
"a",
"list",
"of",
"type",
"arguments",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/TypeArgument.java#L153-L168 |
62,981 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classloaderhandler/EquinoxClassLoaderHandler.java | EquinoxClassLoaderHandler.addBundleFile | private static void addBundleFile(final Object bundlefile, final Set<Object> path,
final ClassLoader classLoader, final ClasspathOrder classpathOrderOut, final ScanSpec scanSpec,
final LogNode log) {
// Don't get stuck in infinite loop
if (bundlefile != null && path.add(bundlefil... | java | private static void addBundleFile(final Object bundlefile, final Set<Object> path,
final ClassLoader classLoader, final ClasspathOrder classpathOrderOut, final ScanSpec scanSpec,
final LogNode log) {
// Don't get stuck in infinite loop
if (bundlefile != null && path.add(bundlefil... | [
"private",
"static",
"void",
"addBundleFile",
"(",
"final",
"Object",
"bundlefile",
",",
"final",
"Set",
"<",
"Object",
">",
"path",
",",
"final",
"ClassLoader",
"classLoader",
",",
"final",
"ClasspathOrder",
"classpathOrderOut",
",",
"final",
"ScanSpec",
"scanSpe... | Add the bundle file.
@param bundlefile
the bundle file
@param path
the path
@param classLoader
the classloader
@param classpathOrderOut
the classpath order
@param scanSpec
the scan spec
@param log
the log | [
"Add",
"the",
"bundle",
"file",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classloaderhandler/EquinoxClassLoaderHandler.java#L103-L134 |
62,982 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/classloaderhandler/EquinoxClassLoaderHandler.java | EquinoxClassLoaderHandler.addClasspathEntries | private static void addClasspathEntries(final Object owner, final ClassLoader classLoader,
final ClasspathOrder classpathOrderOut, final ScanSpec scanSpec, final LogNode log) {
// type ClasspathEntry[]
final Object entries = ReflectionUtils.getFieldVal(owner, "entries", false);
if (e... | java | private static void addClasspathEntries(final Object owner, final ClassLoader classLoader,
final ClasspathOrder classpathOrderOut, final ScanSpec scanSpec, final LogNode log) {
// type ClasspathEntry[]
final Object entries = ReflectionUtils.getFieldVal(owner, "entries", false);
if (e... | [
"private",
"static",
"void",
"addClasspathEntries",
"(",
"final",
"Object",
"owner",
",",
"final",
"ClassLoader",
"classLoader",
",",
"final",
"ClasspathOrder",
"classpathOrderOut",
",",
"final",
"ScanSpec",
"scanSpec",
",",
"final",
"LogNode",
"log",
")",
"{",
"/... | Adds the classpath entries.
@param owner
the owner
@param classLoader
the class loader
@param classpathOrderOut
the classpath order out
@param scanSpec
the scan spec
@param log
the log | [
"Adds",
"the",
"classpath",
"entries",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/classloaderhandler/EquinoxClassLoaderHandler.java#L150-L163 |
62,983 | classgraph/classgraph | src/main/java/io/github/classgraph/ClassTypeSignature.java | ClassTypeSignature.parse | static ClassTypeSignature parse(final String typeDescriptor, final ClassInfo classInfo) throws ParseException {
final Parser parser = new Parser(typeDescriptor);
// The defining class name is used to resolve type variables using the defining class' type descriptor.
// But here we are parsing the... | java | static ClassTypeSignature parse(final String typeDescriptor, final ClassInfo classInfo) throws ParseException {
final Parser parser = new Parser(typeDescriptor);
// The defining class name is used to resolve type variables using the defining class' type descriptor.
// But here we are parsing the... | [
"static",
"ClassTypeSignature",
"parse",
"(",
"final",
"String",
"typeDescriptor",
",",
"final",
"ClassInfo",
"classInfo",
")",
"throws",
"ParseException",
"{",
"final",
"Parser",
"parser",
"=",
"new",
"Parser",
"(",
"typeDescriptor",
")",
";",
"// The defining clas... | Parse a class type signature or class type descriptor.
@param typeDescriptor
The class type signature or class type descriptor to parse.
@param classInfo
the class info
@return The parsed class type signature or class type descriptor.
@throws ParseException
If the class type signature could not be parsed. | [
"Parse",
"a",
"class",
"type",
"signature",
"or",
"class",
"type",
"descriptor",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ClassTypeSignature.java#L124-L151 |
62,984 | classgraph/classgraph | src/main/java/io/github/classgraph/FieldInfo.java | FieldInfo.getTypeDescriptor | public TypeSignature getTypeDescriptor() {
if (typeDescriptorStr == null) {
return null;
}
if (typeDescriptor == null) {
try {
typeDescriptor = TypeSignature.parse(typeDescriptorStr, declaringClassName);
typeDescriptor.setScanResult(scanRes... | java | public TypeSignature getTypeDescriptor() {
if (typeDescriptorStr == null) {
return null;
}
if (typeDescriptor == null) {
try {
typeDescriptor = TypeSignature.parse(typeDescriptorStr, declaringClassName);
typeDescriptor.setScanResult(scanRes... | [
"public",
"TypeSignature",
"getTypeDescriptor",
"(",
")",
"{",
"if",
"(",
"typeDescriptorStr",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"typeDescriptor",
"==",
"null",
")",
"{",
"try",
"{",
"typeDescriptor",
"=",
"TypeSignature",
".",
... | Returns the parsed type descriptor for the field, if available.
@return The parsed type descriptor for the field, if available, else returns null. | [
"Returns",
"the",
"parsed",
"type",
"descriptor",
"for",
"the",
"field",
"if",
"available",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/FieldInfo.java#L202-L215 |
62,985 | classgraph/classgraph | src/main/java/io/github/classgraph/FieldInfo.java | FieldInfo.getTypeSignature | public TypeSignature getTypeSignature() {
if (typeSignatureStr == null) {
return null;
}
if (typeSignature == null) {
try {
typeSignature = TypeSignature.parse(typeSignatureStr, declaringClassName);
typeSignature.setScanResult(scanResult);
... | java | public TypeSignature getTypeSignature() {
if (typeSignatureStr == null) {
return null;
}
if (typeSignature == null) {
try {
typeSignature = TypeSignature.parse(typeSignatureStr, declaringClassName);
typeSignature.setScanResult(scanResult);
... | [
"public",
"TypeSignature",
"getTypeSignature",
"(",
")",
"{",
"if",
"(",
"typeSignatureStr",
"==",
"null",
")",
"{",
"return",
"null",
";",
"}",
"if",
"(",
"typeSignature",
"==",
"null",
")",
"{",
"try",
"{",
"typeSignature",
"=",
"TypeSignature",
".",
"pa... | Returns the parsed type signature for the field, if available.
@return The parsed type signature for the field, if available, else returns null. | [
"Returns",
"the",
"parsed",
"type",
"signature",
"for",
"the",
"field",
"if",
"available",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/FieldInfo.java#L222-L235 |
62,986 | classgraph/classgraph | src/main/java/io/github/classgraph/FieldInfo.java | FieldInfo.compareTo | @Override
public int compareTo(final FieldInfo other) {
final int diff = declaringClassName.compareTo(other.declaringClassName);
if (diff != 0) {
return diff;
}
return name.compareTo(other.name);
} | java | @Override
public int compareTo(final FieldInfo other) {
final int diff = declaringClassName.compareTo(other.declaringClassName);
if (diff != 0) {
return diff;
}
return name.compareTo(other.name);
} | [
"@",
"Override",
"public",
"int",
"compareTo",
"(",
"final",
"FieldInfo",
"other",
")",
"{",
"final",
"int",
"diff",
"=",
"declaringClassName",
".",
"compareTo",
"(",
"other",
".",
"declaringClassName",
")",
";",
"if",
"(",
"diff",
"!=",
"0",
")",
"{",
"... | Sort in order of class name then field name.
@param other
the other FieldInfo object to compare to.
@return the result of comparison. | [
"Sort",
"in",
"order",
"of",
"class",
"name",
"then",
"field",
"name",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/FieldInfo.java#L449-L456 |
62,987 | classgraph/classgraph | src/main/java/io/github/classgraph/Scanner.java | Scanner.getModuleOrder | private List<ClasspathElementModule> getModuleOrder(final LogNode log) throws InterruptedException {
final List<ClasspathElementModule> moduleCpEltOrder = new ArrayList<>();
if (scanSpec.overrideClasspath == null && scanSpec.overrideClassLoaders == null && scanSpec.scanModules) {
// Add modu... | java | private List<ClasspathElementModule> getModuleOrder(final LogNode log) throws InterruptedException {
final List<ClasspathElementModule> moduleCpEltOrder = new ArrayList<>();
if (scanSpec.overrideClasspath == null && scanSpec.overrideClassLoaders == null && scanSpec.scanModules) {
// Add modu... | [
"private",
"List",
"<",
"ClasspathElementModule",
">",
"getModuleOrder",
"(",
"final",
"LogNode",
"log",
")",
"throws",
"InterruptedException",
"{",
"final",
"List",
"<",
"ClasspathElementModule",
">",
"moduleCpEltOrder",
"=",
"new",
"ArrayList",
"<>",
"(",
")",
"... | Get the module order.
@param log
the log
@return the module order
@throws InterruptedException
if interrupted | [
"Get",
"the",
"module",
"order",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/Scanner.java#L175-L231 |
62,988 | classgraph/classgraph | src/main/java/io/github/classgraph/Scanner.java | Scanner.findClasspathOrderRec | private static void findClasspathOrderRec(final ClasspathElement currClasspathElement,
final Set<ClasspathElement> visitedClasspathElts, final List<ClasspathElement> order) {
if (visitedClasspathElts.add(currClasspathElement)) {
if (!currClasspathElement.skipClasspathElement) {
... | java | private static void findClasspathOrderRec(final ClasspathElement currClasspathElement,
final Set<ClasspathElement> visitedClasspathElts, final List<ClasspathElement> order) {
if (visitedClasspathElts.add(currClasspathElement)) {
if (!currClasspathElement.skipClasspathElement) {
... | [
"private",
"static",
"void",
"findClasspathOrderRec",
"(",
"final",
"ClasspathElement",
"currClasspathElement",
",",
"final",
"Set",
"<",
"ClasspathElement",
">",
"visitedClasspathElts",
",",
"final",
"List",
"<",
"ClasspathElement",
">",
"order",
")",
"{",
"if",
"(... | Recursively perform a depth-first search of jar interdependencies, breaking cycles if necessary, to determine
the final classpath element order.
@param currClasspathElement
the current classpath element
@param visitedClasspathElts
visited classpath elts
@param order
the classpath element order | [
"Recursively",
"perform",
"a",
"depth",
"-",
"first",
"search",
"of",
"jar",
"interdependencies",
"breaking",
"cycles",
"if",
"necessary",
"to",
"determine",
"the",
"final",
"classpath",
"element",
"order",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/Scanner.java#L246-L259 |
62,989 | classgraph/classgraph | src/main/java/io/github/classgraph/Scanner.java | Scanner.orderClasspathElements | private static List<ClasspathElement> orderClasspathElements(
final Collection<Entry<Integer, ClasspathElement>> classpathEltsIndexed) {
final List<Entry<Integer, ClasspathElement>> classpathEltsIndexedOrdered = new ArrayList<>(
classpathEltsIndexed);
CollectionUtils.sortIfNo... | java | private static List<ClasspathElement> orderClasspathElements(
final Collection<Entry<Integer, ClasspathElement>> classpathEltsIndexed) {
final List<Entry<Integer, ClasspathElement>> classpathEltsIndexedOrdered = new ArrayList<>(
classpathEltsIndexed);
CollectionUtils.sortIfNo... | [
"private",
"static",
"List",
"<",
"ClasspathElement",
">",
"orderClasspathElements",
"(",
"final",
"Collection",
"<",
"Entry",
"<",
"Integer",
",",
"ClasspathElement",
">",
">",
"classpathEltsIndexed",
")",
"{",
"final",
"List",
"<",
"Entry",
"<",
"Integer",
","... | Sort a collection of indexed ClasspathElements into increasing order of integer index key.
@param classpathEltsIndexed
the indexed classpath elts
@return the classpath elements, ordered by index | [
"Sort",
"a",
"collection",
"of",
"indexed",
"ClasspathElements",
"into",
"increasing",
"order",
"of",
"integer",
"index",
"key",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/Scanner.java#L278-L288 |
62,990 | classgraph/classgraph | src/main/java/io/github/classgraph/Scanner.java | Scanner.findClasspathOrder | private List<ClasspathElement> findClasspathOrder(final Set<ClasspathElement> uniqueClasspathElements,
final Queue<Entry<Integer, ClasspathElement>> toplevelClasspathEltsIndexed) {
final List<ClasspathElement> toplevelClasspathEltsOrdered = orderClasspathElements(
toplevelClasspathEl... | java | private List<ClasspathElement> findClasspathOrder(final Set<ClasspathElement> uniqueClasspathElements,
final Queue<Entry<Integer, ClasspathElement>> toplevelClasspathEltsIndexed) {
final List<ClasspathElement> toplevelClasspathEltsOrdered = orderClasspathElements(
toplevelClasspathEl... | [
"private",
"List",
"<",
"ClasspathElement",
">",
"findClasspathOrder",
"(",
"final",
"Set",
"<",
"ClasspathElement",
">",
"uniqueClasspathElements",
",",
"final",
"Queue",
"<",
"Entry",
"<",
"Integer",
",",
"ClasspathElement",
">",
">",
"toplevelClasspathEltsIndexed",... | Recursively perform a depth-first traversal of child classpath elements, breaking cycles if necessary, to
determine the final classpath element order. This causes child classpath elements to be inserted in-place in
the classpath order, after the parent classpath element that contained them.
@param uniqueClasspathEleme... | [
"Recursively",
"perform",
"a",
"depth",
"-",
"first",
"traversal",
"of",
"child",
"classpath",
"elements",
"breaking",
"cycles",
"if",
"necessary",
"to",
"determine",
"the",
"final",
"classpath",
"element",
"order",
".",
"This",
"causes",
"child",
"classpath",
"... | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/Scanner.java#L301-L315 |
62,991 | classgraph/classgraph | src/main/java/io/github/classgraph/Scanner.java | Scanner.processWorkUnits | private <W> void processWorkUnits(final Collection<W> workUnits, final LogNode log,
final WorkUnitProcessor<W> workUnitProcessor) throws InterruptedException, ExecutionException {
WorkQueue.runWorkQueue(workUnits, executorService, interruptionChecker, numParallelTasks, log,
workUnitP... | java | private <W> void processWorkUnits(final Collection<W> workUnits, final LogNode log,
final WorkUnitProcessor<W> workUnitProcessor) throws InterruptedException, ExecutionException {
WorkQueue.runWorkQueue(workUnits, executorService, interruptionChecker, numParallelTasks, log,
workUnitP... | [
"private",
"<",
"W",
">",
"void",
"processWorkUnits",
"(",
"final",
"Collection",
"<",
"W",
">",
"workUnits",
",",
"final",
"LogNode",
"log",
",",
"final",
"WorkUnitProcessor",
"<",
"W",
">",
"workUnitProcessor",
")",
"throws",
"InterruptedException",
",",
"Ex... | Process work units.
@param <W>
the work unit type
@param workUnits
the work units
@param log
the log entry text to group work units under
@param workUnitProcessor
the work unit processor
@throws InterruptedException
if a worker was interrupted.
@throws ExecutionException
If a worker threw an uncaught exception. | [
"Process",
"work",
"units",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/Scanner.java#L335-L344 |
62,992 | classgraph/classgraph | src/main/java/io/github/classgraph/Scanner.java | Scanner.call | @Override
public ScanResult call() throws InterruptedException, CancellationException, ExecutionException {
ScanResult scanResult = null;
Exception exception = null;
final long scanStart = System.currentTimeMillis();
try {
// Perform the scan
scanResult = open... | java | @Override
public ScanResult call() throws InterruptedException, CancellationException, ExecutionException {
ScanResult scanResult = null;
Exception exception = null;
final long scanStart = System.currentTimeMillis();
try {
// Perform the scan
scanResult = open... | [
"@",
"Override",
"public",
"ScanResult",
"call",
"(",
")",
"throws",
"InterruptedException",
",",
"CancellationException",
",",
"ExecutionException",
"{",
"ScanResult",
"scanResult",
"=",
"null",
";",
"Exception",
"exception",
"=",
"null",
";",
"final",
"long",
"s... | Determine the unique ordered classpath elements, and run a scan looking for file or classfile matches if
necessary.
@return the scan result
@throws InterruptedException
if scanning was interrupted
@throws CancellationException
if scanning was cancelled
@throws ExecutionException
if a worker threw an uncaught exception | [
"Determine",
"the",
"unique",
"ordered",
"classpath",
"elements",
"and",
"run",
"a",
"scan",
"looking",
"for",
"file",
"or",
"classfile",
"matches",
"if",
"necessary",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/Scanner.java#L994-L1094 |
62,993 | classgraph/classgraph | src/main/java/io/github/classgraph/ModuleReaderProxy.java | ModuleReaderProxy.list | public List<String> list() throws SecurityException {
if (collectorsToList == null) {
throw new IllegalArgumentException("Could not call Collectors.toList()");
}
final Object /* Stream<String> */ resourcesStream = ReflectionUtils.invokeMethod(moduleReader, "list",
/* ... | java | public List<String> list() throws SecurityException {
if (collectorsToList == null) {
throw new IllegalArgumentException("Could not call Collectors.toList()");
}
final Object /* Stream<String> */ resourcesStream = ReflectionUtils.invokeMethod(moduleReader, "list",
/* ... | [
"public",
"List",
"<",
"String",
">",
"list",
"(",
")",
"throws",
"SecurityException",
"{",
"if",
"(",
"collectorsToList",
"==",
"null",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Could not call Collectors.toList()\"",
")",
";",
"}",
"final",
... | Get the list of resources accessible to a ModuleReader.
From the documentation for ModuleReader#list(): "Whether the stream of elements includes names corresponding
to directories in the module is module reader specific. In lazy implementations then an IOException may be
thrown when using the stream to list the module... | [
"Get",
"the",
"list",
"of",
"resources",
"accessible",
"to",
"a",
"ModuleReader",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ModuleReaderProxy.java#L103-L120 |
62,994 | classgraph/classgraph | src/main/java/io/github/classgraph/ModuleReaderProxy.java | ModuleReaderProxy.openOrRead | private Object openOrRead(final String path, final boolean open) throws SecurityException {
final String methodName = open ? "open" : "read";
final Object /* Optional<InputStream> */ optionalInputStream = ReflectionUtils.invokeMethod(moduleReader,
methodName, String.class, path, /* throw... | java | private Object openOrRead(final String path, final boolean open) throws SecurityException {
final String methodName = open ? "open" : "read";
final Object /* Optional<InputStream> */ optionalInputStream = ReflectionUtils.invokeMethod(moduleReader,
methodName, String.class, path, /* throw... | [
"private",
"Object",
"openOrRead",
"(",
"final",
"String",
"path",
",",
"final",
"boolean",
"open",
")",
"throws",
"SecurityException",
"{",
"final",
"String",
"methodName",
"=",
"open",
"?",
"\"open\"",
":",
"\"read\"",
";",
"final",
"Object",
"/* Optional<Inpu... | Use the proxied ModuleReader to open the named resource as an InputStream.
@param path
The path to the resource to open.
@param open
if true, call moduleReader.open(name).get() (returning an InputStream), otherwise call
moduleReader.read(name).get() (returning a ByteBuffer).
@return An {@link InputStream} for the cont... | [
"Use",
"the",
"proxied",
"ModuleReader",
"to",
"open",
"the",
"named",
"resource",
"as",
"an",
"InputStream",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/ModuleReaderProxy.java#L134-L147 |
62,995 | classgraph/classgraph | src/main/java/io/github/classgraph/AnnotationInfoList.java | AnnotationInfoList.findMetaAnnotations | private static void findMetaAnnotations(final AnnotationInfo ai, final AnnotationInfoList allAnnotationsOut,
final Set<ClassInfo> visited) {
final ClassInfo annotationClassInfo = ai.getClassInfo();
if (annotationClassInfo != null && annotationClassInfo.annotationInfo != null
// Don't... | java | private static void findMetaAnnotations(final AnnotationInfo ai, final AnnotationInfoList allAnnotationsOut,
final Set<ClassInfo> visited) {
final ClassInfo annotationClassInfo = ai.getClassInfo();
if (annotationClassInfo != null && annotationClassInfo.annotationInfo != null
// Don't... | [
"private",
"static",
"void",
"findMetaAnnotations",
"(",
"final",
"AnnotationInfo",
"ai",
",",
"final",
"AnnotationInfoList",
"allAnnotationsOut",
",",
"final",
"Set",
"<",
"ClassInfo",
">",
"visited",
")",
"{",
"final",
"ClassInfo",
"annotationClassInfo",
"=",
"ai"... | Find the transitive closure of meta-annotations.
@param ai
the annotationInfo object
@param allAnnotationsOut
annotations out
@param visited
visited | [
"Find",
"the",
"transitive",
"closure",
"of",
"meta",
"-",
"annotations",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/AnnotationInfoList.java#L268-L286 |
62,996 | classgraph/classgraph | src/main/java/io/github/classgraph/MethodInfoList.java | MethodInfoList.containsName | public boolean containsName(final String methodName) {
for (final MethodInfo mi : this) {
if (mi.getName().equals(methodName)) {
return true;
}
}
return false;
} | java | public boolean containsName(final String methodName) {
for (final MethodInfo mi : this) {
if (mi.getName().equals(methodName)) {
return true;
}
}
return false;
} | [
"public",
"boolean",
"containsName",
"(",
"final",
"String",
"methodName",
")",
"{",
"for",
"(",
"final",
"MethodInfo",
"mi",
":",
"this",
")",
"{",
"if",
"(",
"mi",
".",
"getName",
"(",
")",
".",
"equals",
"(",
"methodName",
")",
")",
"{",
"return",
... | Check whether the list contains a method with the given name.
@param methodName
The name of a class.
@return true if the list contains a method with the given name. | [
"Check",
"whether",
"the",
"list",
"contains",
"a",
"method",
"with",
"the",
"given",
"name",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/io/github/classgraph/MethodInfoList.java#L165-L172 |
62,997 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/utils/InputStreamOrByteBufferAdapter.java | InputStreamOrByteBufferAdapter.read | private int read(final int off, final int len) throws IOException {
if (len == 0) {
return 0;
}
if (inputStream != null) {
// Wrapped InputStream
return inputStream.read(buf, off, len);
} else {
// Wrapped ByteBuffer
final int b... | java | private int read(final int off, final int len) throws IOException {
if (len == 0) {
return 0;
}
if (inputStream != null) {
// Wrapped InputStream
return inputStream.read(buf, off, len);
} else {
// Wrapped ByteBuffer
final int b... | [
"private",
"int",
"read",
"(",
"final",
"int",
"off",
",",
"final",
"int",
"len",
")",
"throws",
"IOException",
"{",
"if",
"(",
"len",
"==",
"0",
")",
"{",
"return",
"0",
";",
"}",
"if",
"(",
"inputStream",
"!=",
"null",
")",
"{",
"// Wrapped InputSt... | Copy up to len bytes into buf, starting at the given offset.
@param off
The start index for the copy.
@param len
The maximum number of bytes to copy.
@return The number of bytes actually copied.
@throws IOException
If the file content could not be read. | [
"Copy",
"up",
"to",
"len",
"bytes",
"into",
"buf",
"starting",
"at",
"the",
"given",
"offset",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/utils/InputStreamOrByteBufferAdapter.java#L112-L142 |
62,998 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/utils/InputStreamOrByteBufferAdapter.java | InputStreamOrByteBufferAdapter.readMore | private void readMore(final int bytesRequired) throws IOException {
if ((long) used + (long) bytesRequired > FileUtils.MAX_BUFFER_SIZE) {
// Since buf is an array, we're limited to reading 2GB per file
throw new IOException("File is larger than 2GB, cannot read it");
}
//... | java | private void readMore(final int bytesRequired) throws IOException {
if ((long) used + (long) bytesRequired > FileUtils.MAX_BUFFER_SIZE) {
// Since buf is an array, we're limited to reading 2GB per file
throw new IOException("File is larger than 2GB, cannot read it");
}
//... | [
"private",
"void",
"readMore",
"(",
"final",
"int",
"bytesRequired",
")",
"throws",
"IOException",
"{",
"if",
"(",
"(",
"long",
")",
"used",
"+",
"(",
"long",
")",
"bytesRequired",
">",
"FileUtils",
".",
"MAX_BUFFER_SIZE",
")",
"{",
"// Since buf is an array, ... | Read another chunk of from the InputStream or ByteBuffer.
@param bytesRequired
the number of bytes to read
@throws IOException
If an I/O exception occurs. | [
"Read",
"another",
"chunk",
"of",
"from",
"the",
"InputStream",
"or",
"ByteBuffer",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/utils/InputStreamOrByteBufferAdapter.java#L152-L188 |
62,999 | classgraph/classgraph | src/main/java/nonapi/io/github/classgraph/utils/InputStreamOrByteBufferAdapter.java | InputStreamOrByteBufferAdapter.skip | public void skip(final int bytesToSkip) throws IOException {
final int bytesToRead = Math.max(0, curr + bytesToSkip - used);
if (bytesToRead > 0) {
readMore(bytesToRead);
}
curr += bytesToSkip;
} | java | public void skip(final int bytesToSkip) throws IOException {
final int bytesToRead = Math.max(0, curr + bytesToSkip - used);
if (bytesToRead > 0) {
readMore(bytesToRead);
}
curr += bytesToSkip;
} | [
"public",
"void",
"skip",
"(",
"final",
"int",
"bytesToSkip",
")",
"throws",
"IOException",
"{",
"final",
"int",
"bytesToRead",
"=",
"Math",
".",
"max",
"(",
"0",
",",
"curr",
"+",
"bytesToSkip",
"-",
"used",
")",
";",
"if",
"(",
"bytesToRead",
">",
"0... | Skip the given number of bytes.
@param bytesToSkip
The number of bytes to skip.
@throws IOException
If there was an exception while reading. | [
"Skip",
"the",
"given",
"number",
"of",
"bytes",
"."
] | c8c8b2ca1eb76339f69193fdac33d735c864215c | https://github.com/classgraph/classgraph/blob/c8c8b2ca1eb76339f69193fdac33d735c864215c/src/main/java/nonapi/io/github/classgraph/utils/InputStreamOrByteBufferAdapter.java#L329-L335 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.