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 |
|---|---|---|---|---|---|---|---|---|---|---|---|
22,700 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.isGetter | public static <T extends MethodDescription> ElementMatcher.Junction<T> isGetter() {
return takesArguments(0).and(not(returns(TypeDescription.VOID))).and(nameStartsWith("get").or(nameStartsWith("is").and(returnsGeneric(anyOf(boolean.class, Boolean.class)))));
} | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> isGetter() {
return takesArguments(0).and(not(returns(TypeDescription.VOID))).and(nameStartsWith("get").or(nameStartsWith("is").and(returnsGeneric(anyOf(boolean.class, Boolean.class)))));
} | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"isGetter",
"(",
")",
"{",
"return",
"takesArguments",
"(",
"0",
")",
".",
"and",
"(",
"not",
"(",
"returns",
"(",
"TypeDescription",
".",
... | Matches any Java bean getter method.
@param <T> The type of the matched object.
@return A matcher that matches any getter method. | [
"Matches",
"any",
"Java",
"bean",
"getter",
"method",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1737-L1739 |
22,701 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.hasMethodName | public static <T extends MethodDescription> ElementMatcher.Junction<T> hasMethodName(String internalName) {
if (MethodDescription.CONSTRUCTOR_INTERNAL_NAME.equals(internalName)) {
return isConstructor();
} else if (MethodDescription.TYPE_INITIALIZER_INTERNAL_NAME.equals(internalName)) {
... | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> hasMethodName(String internalName) {
if (MethodDescription.CONSTRUCTOR_INTERNAL_NAME.equals(internalName)) {
return isConstructor();
} else if (MethodDescription.TYPE_INITIALIZER_INTERNAL_NAME.equals(internalName)) {
... | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"hasMethodName",
"(",
"String",
"internalName",
")",
"{",
"if",
"(",
"MethodDescription",
".",
"CONSTRUCTOR_INTERNAL_NAME",
".",
"equals",
"(",
"... | Matches a method against its internal name such that constructors and type initializers are matched appropriately.
@param internalName The internal name of the method.
@param <T> The type of the matched object.
@return A matcher for a method with the provided internal name. | [
"Matches",
"a",
"method",
"against",
"its",
"internal",
"name",
"such",
"that",
"constructors",
"and",
"type",
"initializers",
"are",
"matched",
"appropriately",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1829-L1837 |
22,702 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.hasSignature | public static <T extends MethodDescription> ElementMatcher.Junction<T> hasSignature(MethodDescription.SignatureToken token) {
return new SignatureTokenMatcher<T>(is(token));
} | java | public static <T extends MethodDescription> ElementMatcher.Junction<T> hasSignature(MethodDescription.SignatureToken token) {
return new SignatureTokenMatcher<T>(is(token));
} | [
"public",
"static",
"<",
"T",
"extends",
"MethodDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"hasSignature",
"(",
"MethodDescription",
".",
"SignatureToken",
"token",
")",
"{",
"return",
"new",
"SignatureTokenMatcher",
"<",
"T",
">",
"(",... | Only matches method descriptions that yield the provided signature token.
@param token The signature token to match against.
@param <T> The type of the matched object.
@return A matcher for a method with the provided signature token. | [
"Only",
"matches",
"method",
"descriptions",
"that",
"yield",
"the",
"provided",
"signature",
"token",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1846-L1848 |
22,703 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.isSubTypeOf | public static <T extends TypeDescription> ElementMatcher.Junction<T> isSubTypeOf(TypeDescription type) {
return new SubTypeMatcher<T>(type);
} | java | public static <T extends TypeDescription> ElementMatcher.Junction<T> isSubTypeOf(TypeDescription type) {
return new SubTypeMatcher<T>(type);
} | [
"public",
"static",
"<",
"T",
"extends",
"TypeDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"isSubTypeOf",
"(",
"TypeDescription",
"type",
")",
"{",
"return",
"new",
"SubTypeMatcher",
"<",
"T",
">",
"(",
"type",
")",
";",
"}"
] | Matches any type description that is a subtype of the given type.
@param type The type to be checked for being a subtype of the matched type.
@param <T> The type of the matched object.
@return A matcher that matches any type description that represents a sub type of the given type. | [
"Matches",
"any",
"type",
"description",
"that",
"is",
"a",
"subtype",
"of",
"the",
"given",
"type",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1868-L1870 |
22,704 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.inheritsAnnotation | public static <T extends TypeDescription> ElementMatcher.Junction<T> inheritsAnnotation(TypeDescription type) {
return inheritsAnnotation(is(type));
} | java | public static <T extends TypeDescription> ElementMatcher.Junction<T> inheritsAnnotation(TypeDescription type) {
return inheritsAnnotation(is(type));
} | [
"public",
"static",
"<",
"T",
"extends",
"TypeDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"inheritsAnnotation",
"(",
"TypeDescription",
"type",
")",
"{",
"return",
"inheritsAnnotation",
"(",
"is",
"(",
"type",
")",
")",
";",
"}"
] | Matches any annotations by their type on a type that declared these annotations or inherited them from its
super classes.
@param type The annotation type to be matched.
@param <T> The type of the matched object.
@return A matcher that matches any inherited annotation by their type. | [
"Matches",
"any",
"annotations",
"by",
"their",
"type",
"on",
"a",
"type",
"that",
"declared",
"these",
"annotations",
"or",
"inherited",
"them",
"from",
"its",
"super",
"classes",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1936-L1938 |
22,705 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.inheritsAnnotation | public static <T extends TypeDescription> ElementMatcher.Junction<T> inheritsAnnotation(ElementMatcher<? super TypeDescription> matcher) {
return hasAnnotation(annotationType(matcher));
} | java | public static <T extends TypeDescription> ElementMatcher.Junction<T> inheritsAnnotation(ElementMatcher<? super TypeDescription> matcher) {
return hasAnnotation(annotationType(matcher));
} | [
"public",
"static",
"<",
"T",
"extends",
"TypeDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"inheritsAnnotation",
"(",
"ElementMatcher",
"<",
"?",
"super",
"TypeDescription",
">",
"matcher",
")",
"{",
"return",
"hasAnnotation",
"(",
"annot... | Matches any annotations by a given matcher on a type that declared these annotations or inherited them from its
super classes.
@param matcher A matcher to apply onto the inherited annotations.
@param <T> The type of the matched object.
@return A matcher that matches any inherited annotation by a given matcher. | [
"Matches",
"any",
"annotations",
"by",
"a",
"given",
"matcher",
"on",
"a",
"type",
"that",
"declared",
"these",
"annotations",
"or",
"inherited",
"them",
"from",
"its",
"super",
"classes",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1948-L1950 |
22,706 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.hasAnnotation | public static <T extends TypeDescription> ElementMatcher.Junction<T> hasAnnotation(ElementMatcher<? super AnnotationDescription> matcher) {
return new InheritedAnnotationMatcher<T>(new CollectionItemMatcher<AnnotationDescription>(matcher));
} | java | public static <T extends TypeDescription> ElementMatcher.Junction<T> hasAnnotation(ElementMatcher<? super AnnotationDescription> matcher) {
return new InheritedAnnotationMatcher<T>(new CollectionItemMatcher<AnnotationDescription>(matcher));
} | [
"public",
"static",
"<",
"T",
"extends",
"TypeDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"hasAnnotation",
"(",
"ElementMatcher",
"<",
"?",
"super",
"AnnotationDescription",
">",
"matcher",
")",
"{",
"return",
"new",
"InheritedAnnotationMa... | Matches a list of annotations by a given matcher on a type that declared these annotations or inherited them
from its super classes.
@param matcher A matcher to apply onto a list of inherited annotations.
@param <T> The type of the matched object.
@return A matcher that matches a list of inherited annotation by a ... | [
"Matches",
"a",
"list",
"of",
"annotations",
"by",
"a",
"given",
"matcher",
"on",
"a",
"type",
"that",
"declared",
"these",
"annotations",
"or",
"inherited",
"them",
"from",
"its",
"super",
"classes",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1960-L1962 |
22,707 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.declaresField | public static <T extends TypeDefinition> ElementMatcher.Junction<T> declaresField(ElementMatcher<? super FieldDescription> matcher) {
return new DeclaringFieldMatcher<T>(new CollectionItemMatcher<FieldDescription>(matcher));
} | java | public static <T extends TypeDefinition> ElementMatcher.Junction<T> declaresField(ElementMatcher<? super FieldDescription> matcher) {
return new DeclaringFieldMatcher<T>(new CollectionItemMatcher<FieldDescription>(matcher));
} | [
"public",
"static",
"<",
"T",
"extends",
"TypeDefinition",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"declaresField",
"(",
"ElementMatcher",
"<",
"?",
"super",
"FieldDescription",
">",
"matcher",
")",
"{",
"return",
"new",
"DeclaringFieldMatcher",
"... | Matches a type by a another matcher that is applied on any of its declared fields.
@param matcher The matcher that is applied onto each declared field.
@param <T> The type of the matched object.
@return A matcher that matches any type where another matcher is matched positively on at least on declared field. | [
"Matches",
"a",
"type",
"by",
"a",
"another",
"matcher",
"that",
"is",
"applied",
"on",
"any",
"of",
"its",
"declared",
"fields",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1971-L1973 |
22,708 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.declaresMethod | public static <T extends TypeDefinition> ElementMatcher.Junction<T> declaresMethod(ElementMatcher<? super MethodDescription> matcher) {
return new DeclaringMethodMatcher<T>(new CollectionItemMatcher<MethodDescription>(matcher));
} | java | public static <T extends TypeDefinition> ElementMatcher.Junction<T> declaresMethod(ElementMatcher<? super MethodDescription> matcher) {
return new DeclaringMethodMatcher<T>(new CollectionItemMatcher<MethodDescription>(matcher));
} | [
"public",
"static",
"<",
"T",
"extends",
"TypeDefinition",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"declaresMethod",
"(",
"ElementMatcher",
"<",
"?",
"super",
"MethodDescription",
">",
"matcher",
")",
"{",
"return",
"new",
"DeclaringMethodMatcher",
... | Matches a type by a another matcher that is applied on any of its declared methods.
@param matcher The matcher that is applied onto each declared method.
@param <T> The type of the matched object.
@return A matcher that matches any type where another matcher is matched positively on at least on declared methods. | [
"Matches",
"a",
"type",
"by",
"a",
"another",
"matcher",
"that",
"is",
"applied",
"on",
"any",
"of",
"its",
"declared",
"methods",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L1982-L1984 |
22,709 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.annotationType | public static <T extends AnnotationDescription> ElementMatcher.Junction<T> annotationType(ElementMatcher<? super TypeDescription> matcher) {
return new AnnotationTypeMatcher<T>(matcher);
} | java | public static <T extends AnnotationDescription> ElementMatcher.Junction<T> annotationType(ElementMatcher<? super TypeDescription> matcher) {
return new AnnotationTypeMatcher<T>(matcher);
} | [
"public",
"static",
"<",
"T",
"extends",
"AnnotationDescription",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"annotationType",
"(",
"ElementMatcher",
"<",
"?",
"super",
"TypeDescription",
">",
"matcher",
")",
"{",
"return",
"new",
"AnnotationTypeMatche... | Matches if an annotation's type matches the supplied matcher.
@param matcher The matcher to match the annotation's type against.
@param <T> The type of the matched object.
@return A matcher that matches the annotation's type. | [
"Matches",
"if",
"an",
"annotation",
"s",
"type",
"matches",
"the",
"supplied",
"matcher",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L2143-L2145 |
22,710 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.isChildOf | public static <T extends ClassLoader> ElementMatcher.Junction<T> isChildOf(ClassLoader classLoader) {
return classLoader == BOOTSTRAP_CLASSLOADER
? new BooleanMatcher<T>(true)
: ElementMatchers.<T>hasChild(is(classLoader));
} | java | public static <T extends ClassLoader> ElementMatcher.Junction<T> isChildOf(ClassLoader classLoader) {
return classLoader == BOOTSTRAP_CLASSLOADER
? new BooleanMatcher<T>(true)
: ElementMatchers.<T>hasChild(is(classLoader));
} | [
"public",
"static",
"<",
"T",
"extends",
"ClassLoader",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"isChildOf",
"(",
"ClassLoader",
"classLoader",
")",
"{",
"return",
"classLoader",
"==",
"BOOTSTRAP_CLASSLOADER",
"?",
"new",
"BooleanMatcher",
"<",
"T... | Matches any class loader that is either the given class loader or a child of the given class loader.
@param classLoader The class loader of which child class loaders are matched.
@param <T> The type of the matched object.
@return A matcher that matches the given class loader and any class loader that is a chil... | [
"Matches",
"any",
"class",
"loader",
"that",
"is",
"either",
"the",
"given",
"class",
"loader",
"or",
"a",
"child",
"of",
"the",
"given",
"class",
"loader",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L2191-L2195 |
22,711 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.hasChild | public static <T extends ClassLoader> ElementMatcher.Junction<T> hasChild(ElementMatcher<? super ClassLoader> matcher) {
return new ClassLoaderHierarchyMatcher<T>(matcher);
} | java | public static <T extends ClassLoader> ElementMatcher.Junction<T> hasChild(ElementMatcher<? super ClassLoader> matcher) {
return new ClassLoaderHierarchyMatcher<T>(matcher);
} | [
"public",
"static",
"<",
"T",
"extends",
"ClassLoader",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"hasChild",
"(",
"ElementMatcher",
"<",
"?",
"super",
"ClassLoader",
">",
"matcher",
")",
"{",
"return",
"new",
"ClassLoaderHierarchyMatcher",
"<",
"... | Matches all class loaders in the hierarchy of the matched class loader against a given matcher.
@param matcher The matcher to apply to all class loaders in the hierarchy of the matched class loader.
@param <T> The type of the matched object.
@return A matcher that matches all class loaders in the hierarchy of the ... | [
"Matches",
"all",
"class",
"loaders",
"in",
"the",
"hierarchy",
"of",
"the",
"matched",
"class",
"loader",
"against",
"a",
"given",
"matcher",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L2204-L2206 |
22,712 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.isParentOf | public static <T extends ClassLoader> ElementMatcher.Junction<T> isParentOf(ClassLoader classLoader) {
return classLoader == BOOTSTRAP_CLASSLOADER
? ElementMatchers.<T>isBootstrapClassLoader()
: new ClassLoaderParentMatcher<T>(classLoader);
} | java | public static <T extends ClassLoader> ElementMatcher.Junction<T> isParentOf(ClassLoader classLoader) {
return classLoader == BOOTSTRAP_CLASSLOADER
? ElementMatchers.<T>isBootstrapClassLoader()
: new ClassLoaderParentMatcher<T>(classLoader);
} | [
"public",
"static",
"<",
"T",
"extends",
"ClassLoader",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"isParentOf",
"(",
"ClassLoader",
"classLoader",
")",
"{",
"return",
"classLoader",
"==",
"BOOTSTRAP_CLASSLOADER",
"?",
"ElementMatchers",
".",
"<",
"T... | Matches any class loader that is either the given class loader or a parent of the given class loader.
@param classLoader The class loader of which parent class loaders are matched.
@param <T> The type of the matched object.
@return A matcher that matches the given class loader and any class loader that is a pa... | [
"Matches",
"any",
"class",
"loader",
"that",
"is",
"either",
"the",
"given",
"class",
"loader",
"or",
"a",
"parent",
"of",
"the",
"given",
"class",
"loader",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L2216-L2220 |
22,713 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java | ElementMatchers.ofType | public static <T extends ClassLoader> ElementMatcher.Junction<T> ofType(ElementMatcher<? super TypeDescription> matcher) {
return new InstanceTypeMatcher<T>(matcher);
} | java | public static <T extends ClassLoader> ElementMatcher.Junction<T> ofType(ElementMatcher<? super TypeDescription> matcher) {
return new InstanceTypeMatcher<T>(matcher);
} | [
"public",
"static",
"<",
"T",
"extends",
"ClassLoader",
">",
"ElementMatcher",
".",
"Junction",
"<",
"T",
">",
"ofType",
"(",
"ElementMatcher",
"<",
"?",
"super",
"TypeDescription",
">",
"matcher",
")",
"{",
"return",
"new",
"InstanceTypeMatcher",
"<",
"T",
... | Matches a class loader's type unless it is the bootstrap class loader which is never matched.
@param matcher The matcher to apply to the class loader's type.
@param <T> The type of the matched object.
@return A matcher that matches the class loader's type. | [
"Matches",
"a",
"class",
"loader",
"s",
"type",
"unless",
"it",
"is",
"the",
"bootstrap",
"class",
"loader",
"which",
"is",
"never",
"matched",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/ElementMatchers.java#L2229-L2231 |
22,714 | raphw/byte-buddy | byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java | ByteBuddyMojo.findJavaVersionString | private static String findJavaVersionString(MavenProject project) {
while (project != null) {
String target = project.getProperties().getProperty("maven.compiler.target");
if (target != null) {
return target;
}
for (org.apache.maven.model.Plugin pl... | java | private static String findJavaVersionString(MavenProject project) {
while (project != null) {
String target = project.getProperties().getProperty("maven.compiler.target");
if (target != null) {
return target;
}
for (org.apache.maven.model.Plugin pl... | [
"private",
"static",
"String",
"findJavaVersionString",
"(",
"MavenProject",
"project",
")",
"{",
"while",
"(",
"project",
"!=",
"null",
")",
"{",
"String",
"target",
"=",
"project",
".",
"getProperties",
"(",
")",
".",
"getProperty",
"(",
"\"maven.compiler.targ... | Makes a best effort of locating the configured Java target version.
@param project The relevant Maven project.
@return The Java version string of the configured build target version or {@code null} if no explicit configuration was detected. | [
"Makes",
"a",
"best",
"effort",
"of",
"locating",
"the",
"configured",
"Java",
"target",
"version",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/ByteBuddyMojo.java#L322-L341 |
22,715 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/auxiliary/MethodCallProxy.java | MethodCallProxy.extractFields | private static LinkedHashMap<String, TypeDescription> extractFields(MethodDescription methodDescription) {
LinkedHashMap<String, TypeDescription> typeDescriptions = new LinkedHashMap<String, TypeDescription>();
int currentIndex = 0;
if (!methodDescription.isStatic()) {
typeDescriptio... | java | private static LinkedHashMap<String, TypeDescription> extractFields(MethodDescription methodDescription) {
LinkedHashMap<String, TypeDescription> typeDescriptions = new LinkedHashMap<String, TypeDescription>();
int currentIndex = 0;
if (!methodDescription.isStatic()) {
typeDescriptio... | [
"private",
"static",
"LinkedHashMap",
"<",
"String",
",",
"TypeDescription",
">",
"extractFields",
"(",
"MethodDescription",
"methodDescription",
")",
"{",
"LinkedHashMap",
"<",
"String",
",",
"TypeDescription",
">",
"typeDescriptions",
"=",
"new",
"LinkedHashMap",
"<... | Creates a linked hash map of field names to their types where each field represents a parameter of the method.
@param methodDescription The method to extract into fields.
@return A map of fields in the order they need to be loaded onto the operand stack for invoking the original
method, including a reference to the in... | [
"Creates",
"a",
"linked",
"hash",
"map",
"of",
"field",
"names",
"to",
"their",
"types",
"where",
"each",
"field",
"represents",
"a",
"parameter",
"of",
"the",
"method",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/auxiliary/MethodCallProxy.java#L126-L136 |
22,716 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/description/type/TypeVariableToken.java | TypeVariableToken.of | public static TypeVariableToken of(TypeDescription.Generic typeVariable, ElementMatcher<? super TypeDescription> matcher) {
return new TypeVariableToken(typeVariable.getSymbol(),
typeVariable.getUpperBounds().accept(new TypeDescription.Generic.Visitor.Substitutor.ForDetachment(matcher)),
... | java | public static TypeVariableToken of(TypeDescription.Generic typeVariable, ElementMatcher<? super TypeDescription> matcher) {
return new TypeVariableToken(typeVariable.getSymbol(),
typeVariable.getUpperBounds().accept(new TypeDescription.Generic.Visitor.Substitutor.ForDetachment(matcher)),
... | [
"public",
"static",
"TypeVariableToken",
"of",
"(",
"TypeDescription",
".",
"Generic",
"typeVariable",
",",
"ElementMatcher",
"<",
"?",
"super",
"TypeDescription",
">",
"matcher",
")",
"{",
"return",
"new",
"TypeVariableToken",
"(",
"typeVariable",
".",
"getSymbol",... | Transforms a type variable into a type variable token with its bounds detached.
@param typeVariable A type variable in its attached state.
@param matcher A matcher that identifies types to detach from the upper bound types.
@return A token representing the detached type variable. | [
"Transforms",
"a",
"type",
"variable",
"into",
"a",
"type",
"variable",
"token",
"with",
"its",
"bounds",
"detached",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/description/type/TypeVariableToken.java#L76-L80 |
22,717 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/assign/TypeCasting.java | TypeCasting.to | public static StackManipulation to(TypeDefinition typeDefinition) {
if (typeDefinition.isPrimitive()) {
throw new IllegalArgumentException("Cannot cast to primitive type: " + typeDefinition);
}
return new TypeCasting(typeDefinition.asErasure());
} | java | public static StackManipulation to(TypeDefinition typeDefinition) {
if (typeDefinition.isPrimitive()) {
throw new IllegalArgumentException("Cannot cast to primitive type: " + typeDefinition);
}
return new TypeCasting(typeDefinition.asErasure());
} | [
"public",
"static",
"StackManipulation",
"to",
"(",
"TypeDefinition",
"typeDefinition",
")",
"{",
"if",
"(",
"typeDefinition",
".",
"isPrimitive",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Cannot cast to primitive type: \"",
"+",
"typeDef... | Creates a casting to the given, non-primitive type.
@param typeDefinition The type to which a value should be casted.
@return A stack manipulation that represents the casting. | [
"Creates",
"a",
"casting",
"to",
"the",
"given",
"non",
"-",
"primitive",
"type",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/assign/TypeCasting.java#L54-L59 |
22,718 | raphw/byte-buddy | byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/Transformation.java | Transformation.argument | public void argument(Closure<?> closure) {
arguments.add((PluginArgument) project.configure(new PluginArgument(), closure));
} | java | public void argument(Closure<?> closure) {
arguments.add((PluginArgument) project.configure(new PluginArgument(), closure));
} | [
"public",
"void",
"argument",
"(",
"Closure",
"<",
"?",
">",
"closure",
")",
"{",
"arguments",
".",
"add",
"(",
"(",
"PluginArgument",
")",
"project",
".",
"configure",
"(",
"new",
"PluginArgument",
"(",
")",
",",
"closure",
")",
")",
";",
"}"
] | Adds a plugin argument to consider during instantiation.
@param closure The closure for configuring the argument. | [
"Adds",
"a",
"plugin",
"argument",
"to",
"consider",
"during",
"instantiation",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/Transformation.java#L62-L64 |
22,719 | raphw/byte-buddy | byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/Transformation.java | Transformation.makeArgumentResolvers | public List<Plugin.Factory.UsingReflection.ArgumentResolver> makeArgumentResolvers() {
if (arguments == null) {
return Collections.emptyList();
} else {
List<Plugin.Factory.UsingReflection.ArgumentResolver> argumentResolvers = new ArrayList<Plugin.Factory.UsingReflection.Argument... | java | public List<Plugin.Factory.UsingReflection.ArgumentResolver> makeArgumentResolvers() {
if (arguments == null) {
return Collections.emptyList();
} else {
List<Plugin.Factory.UsingReflection.ArgumentResolver> argumentResolvers = new ArrayList<Plugin.Factory.UsingReflection.Argument... | [
"public",
"List",
"<",
"Plugin",
".",
"Factory",
".",
"UsingReflection",
".",
"ArgumentResolver",
">",
"makeArgumentResolvers",
"(",
")",
"{",
"if",
"(",
"arguments",
"==",
"null",
")",
"{",
"return",
"Collections",
".",
"emptyList",
"(",
")",
";",
"}",
"e... | Creates the argument resolvers for the plugin's constructor by transforming the plugin arguments.
@return A list of argument resolvers. | [
"Creates",
"the",
"argument",
"resolvers",
"for",
"the",
"plugin",
"s",
"constructor",
"by",
"transforming",
"the",
"plugin",
"arguments",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/Transformation.java#L101-L111 |
22,720 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/TypeCreation.java | TypeCreation.of | public static StackManipulation of(TypeDescription typeDescription) {
if (typeDescription.isArray() || typeDescription.isPrimitive() || typeDescription.isAbstract()) {
throw new IllegalArgumentException(typeDescription + " is not instantiable");
}
return new TypeCreation(typeDescript... | java | public static StackManipulation of(TypeDescription typeDescription) {
if (typeDescription.isArray() || typeDescription.isPrimitive() || typeDescription.isAbstract()) {
throw new IllegalArgumentException(typeDescription + " is not instantiable");
}
return new TypeCreation(typeDescript... | [
"public",
"static",
"StackManipulation",
"of",
"(",
"TypeDescription",
"typeDescription",
")",
"{",
"if",
"(",
"typeDescription",
".",
"isArray",
"(",
")",
"||",
"typeDescription",
".",
"isPrimitive",
"(",
")",
"||",
"typeDescription",
".",
"isAbstract",
"(",
")... | Creates a type creation for the given type.
@param typeDescription The type to be create.
@return A stack manipulation that represents the creation of the given type. | [
"Creates",
"a",
"type",
"creation",
"for",
"the",
"given",
"type",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/TypeCreation.java#L50-L55 |
22,721 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/specimen/ExampleClass.java | ExampleClass.method | public Object[] method(Object arg1, Object arg2, Object arg3) {
return new Object[]{arg1, arg2, arg3};
} | java | public Object[] method(Object arg1, Object arg2, Object arg3) {
return new Object[]{arg1, arg2, arg3};
} | [
"public",
"Object",
"[",
"]",
"method",
"(",
"Object",
"arg1",
",",
"Object",
"arg2",
",",
"Object",
"arg3",
")",
"{",
"return",
"new",
"Object",
"[",
"]",
"{",
"arg1",
",",
"arg2",
",",
"arg3",
"}",
";",
"}"
] | An example method.
@param arg1 An argument.
@param arg2 An argument.
@param arg3 An argument.
@return All arguments stored in an array. | [
"An",
"example",
"method",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/specimen/ExampleClass.java#L217-L219 |
22,722 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/MethodOverrideMatcher.java | MethodOverrideMatcher.matches | private boolean matches(MethodDescription target, List<? extends TypeDefinition> typeDefinitions, Set<TypeDescription> duplicates) {
for (TypeDefinition anInterface : typeDefinitions) {
if (duplicates.add(anInterface.asErasure()) && (matches(target, anInterface) || matches(target, anInterface.getInt... | java | private boolean matches(MethodDescription target, List<? extends TypeDefinition> typeDefinitions, Set<TypeDescription> duplicates) {
for (TypeDefinition anInterface : typeDefinitions) {
if (duplicates.add(anInterface.asErasure()) && (matches(target, anInterface) || matches(target, anInterface.getInt... | [
"private",
"boolean",
"matches",
"(",
"MethodDescription",
"target",
",",
"List",
"<",
"?",
"extends",
"TypeDefinition",
">",
"typeDefinitions",
",",
"Set",
"<",
"TypeDescription",
">",
"duplicates",
")",
"{",
"for",
"(",
"TypeDefinition",
"anInterface",
":",
"t... | Matches a method against a list of types.
@param target The method that is matched as a target.
@param typeDefinitions The type definitions to check if they declare a method with the same signature as {@code target}.
@param duplicates A set containing duplicate interfaces that do not need to be revisited... | [
"Matches",
"a",
"method",
"against",
"a",
"list",
"of",
"types",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/MethodOverrideMatcher.java#L72-L79 |
22,723 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java | MethodHandle.of | public static MethodHandle of(MethodDescription.InDefinedShape methodDescription) {
return new MethodHandle(HandleType.of(methodDescription),
methodDescription.getDeclaringType().asErasure(),
methodDescription.getInternalName(),
methodDescription.g... | java | public static MethodHandle of(MethodDescription.InDefinedShape methodDescription) {
return new MethodHandle(HandleType.of(methodDescription),
methodDescription.getDeclaringType().asErasure(),
methodDescription.getInternalName(),
methodDescription.g... | [
"public",
"static",
"MethodHandle",
"of",
"(",
"MethodDescription",
".",
"InDefinedShape",
"methodDescription",
")",
"{",
"return",
"new",
"MethodHandle",
"(",
"HandleType",
".",
"of",
"(",
"methodDescription",
")",
",",
"methodDescription",
".",
"getDeclaringType",
... | Creates a method handle representation of the given method.
@param methodDescription The method ro represent.
@return A method handle representing the given method. | [
"Creates",
"a",
"method",
"handle",
"representation",
"of",
"the",
"given",
"method",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java#L545-L551 |
22,724 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java | MethodHandle.ofGetter | public static MethodHandle ofGetter(FieldDescription.InDefinedShape fieldDescription) {
return new MethodHandle(HandleType.ofGetter(fieldDescription),
fieldDescription.getDeclaringType().asErasure(),
fieldDescription.getInternalName(),
fieldDescrip... | java | public static MethodHandle ofGetter(FieldDescription.InDefinedShape fieldDescription) {
return new MethodHandle(HandleType.ofGetter(fieldDescription),
fieldDescription.getDeclaringType().asErasure(),
fieldDescription.getInternalName(),
fieldDescrip... | [
"public",
"static",
"MethodHandle",
"ofGetter",
"(",
"FieldDescription",
".",
"InDefinedShape",
"fieldDescription",
")",
"{",
"return",
"new",
"MethodHandle",
"(",
"HandleType",
".",
"ofGetter",
"(",
"fieldDescription",
")",
",",
"fieldDescription",
".",
"getDeclaring... | Returns a method handle for a setter of the given field.
@param fieldDescription The field to represent.
@return A method handle for a setter of the given field. | [
"Returns",
"a",
"method",
"handle",
"for",
"a",
"setter",
"of",
"the",
"given",
"field",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java#L598-L604 |
22,725 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java | MethodHandle.ofSetter | public static MethodHandle ofSetter(FieldDescription.InDefinedShape fieldDescription) {
return new MethodHandle(HandleType.ofSetter(fieldDescription),
fieldDescription.getDeclaringType().asErasure(),
fieldDescription.getInternalName(),
TypeDescript... | java | public static MethodHandle ofSetter(FieldDescription.InDefinedShape fieldDescription) {
return new MethodHandle(HandleType.ofSetter(fieldDescription),
fieldDescription.getDeclaringType().asErasure(),
fieldDescription.getInternalName(),
TypeDescript... | [
"public",
"static",
"MethodHandle",
"ofSetter",
"(",
"FieldDescription",
".",
"InDefinedShape",
"fieldDescription",
")",
"{",
"return",
"new",
"MethodHandle",
"(",
"HandleType",
".",
"ofSetter",
"(",
"fieldDescription",
")",
",",
"fieldDescription",
".",
"getDeclaring... | Returns a method handle for a getter of the given field.
@param fieldDescription The field to represent.
@return A method handle for a getter of the given field. | [
"Returns",
"a",
"method",
"handle",
"for",
"a",
"getter",
"of",
"the",
"given",
"field",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java#L622-L628 |
22,726 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java | MethodHandle.getDescriptor | public String getDescriptor() {
StringBuilder stringBuilder = new StringBuilder().append('(');
for (TypeDescription parameterType : parameterTypes) {
stringBuilder.append(parameterType.getDescriptor());
}
return stringBuilder.append(')').append(returnType.... | java | public String getDescriptor() {
StringBuilder stringBuilder = new StringBuilder().append('(');
for (TypeDescription parameterType : parameterTypes) {
stringBuilder.append(parameterType.getDescriptor());
}
return stringBuilder.append(')').append(returnType.... | [
"public",
"String",
"getDescriptor",
"(",
")",
"{",
"StringBuilder",
"stringBuilder",
"=",
"new",
"StringBuilder",
"(",
")",
".",
"append",
"(",
"'",
"'",
")",
";",
"for",
"(",
"TypeDescription",
"parameterType",
":",
"parameterTypes",
")",
"{",
"stringBuilder... | Returns the method descriptor of this method handle representation.
@return The method descriptor of this method handle representation. | [
"Returns",
"the",
"method",
"descriptor",
"of",
"this",
"method",
"handle",
"representation",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java#L699-L705 |
22,727 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java | Dynamic.ofVarHandle | public static JavaConstant ofVarHandle(FieldDescription.InDefinedShape fieldDescription) {
return new Dynamic(new ConstantDynamic(fieldDescription.getInternalName(),
JavaType.VAR_HANDLE.getTypeStub().getDescriptor(),
new Handle(Opcodes.H_INVOKESTATIC,
... | java | public static JavaConstant ofVarHandle(FieldDescription.InDefinedShape fieldDescription) {
return new Dynamic(new ConstantDynamic(fieldDescription.getInternalName(),
JavaType.VAR_HANDLE.getTypeStub().getDescriptor(),
new Handle(Opcodes.H_INVOKESTATIC,
... | [
"public",
"static",
"JavaConstant",
"ofVarHandle",
"(",
"FieldDescription",
".",
"InDefinedShape",
"fieldDescription",
")",
"{",
"return",
"new",
"Dynamic",
"(",
"new",
"ConstantDynamic",
"(",
"fieldDescription",
".",
"getInternalName",
"(",
")",
",",
"JavaType",
".... | Resolves a var handle constant for a field.
@param fieldDescription The field to represent a var handle for.
@return A dynamic constant that represents the created var handle constant. | [
"Resolves",
"a",
"var",
"handle",
"constant",
"for",
"a",
"field",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java#L1655-L1667 |
22,728 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java | Dynamic.ofArrayVarHandle | public static JavaConstant ofArrayVarHandle(TypeDescription typeDescription) {
if (!typeDescription.isArray()) {
throw new IllegalArgumentException("Not an array type: " + typeDescription);
}
return new Dynamic(new ConstantDynamic("arrayVarHandle",
... | java | public static JavaConstant ofArrayVarHandle(TypeDescription typeDescription) {
if (!typeDescription.isArray()) {
throw new IllegalArgumentException("Not an array type: " + typeDescription);
}
return new Dynamic(new ConstantDynamic("arrayVarHandle",
... | [
"public",
"static",
"JavaConstant",
"ofArrayVarHandle",
"(",
"TypeDescription",
"typeDescription",
")",
"{",
"if",
"(",
"!",
"typeDescription",
".",
"isArray",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Not an array type: \"",
"+",
"type... | Resolves a var handle constant for an array.
@param typeDescription The array type for which the var handle is resolved.
@return A dynamic constant that represents the created var handle constant. | [
"Resolves",
"a",
"var",
"handle",
"constant",
"for",
"an",
"array",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaConstant.java#L1685-L1697 |
22,729 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/TrivialClassCreationBenchmark.java | TrivialClassCreationBenchmark.benchmarkJavassist | @Benchmark
public Class<?> benchmarkJavassist() {
ProxyFactory proxyFactory = new ProxyFactory() {
protected ClassLoader getClassLoader() {
return newClassLoader();
}
};
proxyFactory.setUseCache(false);
proxyFactory.setUseWriteReplace(false);
... | java | @Benchmark
public Class<?> benchmarkJavassist() {
ProxyFactory proxyFactory = new ProxyFactory() {
protected ClassLoader getClassLoader() {
return newClassLoader();
}
};
proxyFactory.setUseCache(false);
proxyFactory.setUseWriteReplace(false);
... | [
"@",
"Benchmark",
"public",
"Class",
"<",
"?",
">",
"benchmarkJavassist",
"(",
")",
"{",
"ProxyFactory",
"proxyFactory",
"=",
"new",
"ProxyFactory",
"(",
")",
"{",
"protected",
"ClassLoader",
"getClassLoader",
"(",
")",
"{",
"return",
"newClassLoader",
"(",
")... | Performs a benchmark for a trivial class creation using javassist proxies.
@return The created instance, in order to avoid JIT removal. | [
"Performs",
"a",
"benchmark",
"for",
"a",
"trivial",
"class",
"creation",
"using",
"javassist",
"proxies",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/TrivialClassCreationBenchmark.java#L122-L138 |
22,730 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberRemoval.java | MemberRemoval.stripFields | public MemberRemoval stripFields(ElementMatcher<? super FieldDescription.InDefinedShape> matcher) {
return new MemberRemoval(fieldMatcher.or(matcher), methodMatcher);
} | java | public MemberRemoval stripFields(ElementMatcher<? super FieldDescription.InDefinedShape> matcher) {
return new MemberRemoval(fieldMatcher.or(matcher), methodMatcher);
} | [
"public",
"MemberRemoval",
"stripFields",
"(",
"ElementMatcher",
"<",
"?",
"super",
"FieldDescription",
".",
"InDefinedShape",
">",
"matcher",
")",
"{",
"return",
"new",
"MemberRemoval",
"(",
"fieldMatcher",
".",
"or",
"(",
"matcher",
")",
",",
"methodMatcher",
... | Specifies that any field that matches the specified matcher should be removed.
@param matcher The matcher that decides upon field removal.
@return A new member removal instance that removes all previously specified members and any fields that match the specified matcher. | [
"Specifies",
"that",
"any",
"field",
"that",
"matches",
"the",
"specified",
"matcher",
"should",
"be",
"removed",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberRemoval.java#L92-L94 |
22,731 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberRemoval.java | MemberRemoval.stripInvokables | public MemberRemoval stripInvokables(ElementMatcher<? super MethodDescription> matcher) {
return new MemberRemoval(fieldMatcher, methodMatcher.or(matcher));
} | java | public MemberRemoval stripInvokables(ElementMatcher<? super MethodDescription> matcher) {
return new MemberRemoval(fieldMatcher, methodMatcher.or(matcher));
} | [
"public",
"MemberRemoval",
"stripInvokables",
"(",
"ElementMatcher",
"<",
"?",
"super",
"MethodDescription",
">",
"matcher",
")",
"{",
"return",
"new",
"MemberRemoval",
"(",
"fieldMatcher",
",",
"methodMatcher",
".",
"or",
"(",
"matcher",
")",
")",
";",
"}"
] | Specifies that any method or constructor that matches the specified matcher should be removed.
@param matcher The matcher that decides upon method and constructor removal.
@return A new member removal instance that removes all previously specified members and any method or constructor that matches the specified matche... | [
"Specifies",
"that",
"any",
"method",
"or",
"constructor",
"that",
"matches",
"the",
"specified",
"matcher",
"should",
"be",
"removed",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberRemoval.java#L122-L124 |
22,732 | raphw/byte-buddy | byte-buddy-agent/src/main/java/net/bytebuddy/agent/Attacher.java | Attacher.main | @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback")
public static void main(String[] args) {
try {
String argument;
if (args.length < 4 || args[3].length() == 0) {
argument = null;
}... | java | @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Exception should not be rethrown but trigger a fallback")
public static void main(String[] args) {
try {
String argument;
if (args.length < 4 || args[3].length() == 0) {
argument = null;
}... | [
"@",
"SuppressFBWarnings",
"(",
"value",
"=",
"\"REC_CATCH_EXCEPTION\"",
",",
"justification",
"=",
"\"Exception should not be rethrown but trigger a fallback\"",
")",
"public",
"static",
"void",
"main",
"(",
"String",
"[",
"]",
"args",
")",
"{",
"try",
"{",
"String",... | Runs the attacher as a Java application.
@param args A list containing the fully qualified name of the virtual machine type,
the process id, the fully qualified name of the Java agent jar followed by
an empty string if the argument to the agent is {@code null} or any number
of strings where the first argument is proce... | [
"Runs",
"the",
"attacher",
"as",
"a",
"Java",
"application",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-agent/src/main/java/net/bytebuddy/agent/Attacher.java#L63-L80 |
22,733 | raphw/byte-buddy | byte-buddy-agent/src/main/java/net/bytebuddy/agent/Attacher.java | Attacher.install | protected static void install(Class<?> virtualMachineType,
String processId,
String agent,
String argument) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
Object virtualMachin... | java | protected static void install(Class<?> virtualMachineType,
String processId,
String agent,
String argument) throws NoSuchMethodException, InvocationTargetException, IllegalAccessException {
Object virtualMachin... | [
"protected",
"static",
"void",
"install",
"(",
"Class",
"<",
"?",
">",
"virtualMachineType",
",",
"String",
"processId",
",",
"String",
"agent",
",",
"String",
"argument",
")",
"throws",
"NoSuchMethodException",
",",
"InvocationTargetException",
",",
"IllegalAccessE... | Installs a Java agent on a target VM.
@param virtualMachineType The virtual machine type to use for the external attachment.
@param processId The id of the process being target of the external attachment.
@param agent The Java agent to attach.
@param argument The argument to provide or ... | [
"Installs",
"a",
"Java",
"agent",
"on",
"a",
"target",
"VM",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-agent/src/main/java/net/bytebuddy/agent/Attacher.java#L93-L109 |
22,734 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/StreamDrainer.java | StreamDrainer.drain | public byte[] drain(InputStream inputStream) throws IOException {
List<byte[]> previousBytes = new ArrayList<byte[]>();
byte[] currentArray = new byte[bufferSize];
int currentIndex = 0;
int currentRead;
do {
currentRead = inputStream.read(currentArray, currentIndex, b... | java | public byte[] drain(InputStream inputStream) throws IOException {
List<byte[]> previousBytes = new ArrayList<byte[]>();
byte[] currentArray = new byte[bufferSize];
int currentIndex = 0;
int currentRead;
do {
currentRead = inputStream.read(currentArray, currentIndex, b... | [
"public",
"byte",
"[",
"]",
"drain",
"(",
"InputStream",
"inputStream",
")",
"throws",
"IOException",
"{",
"List",
"<",
"byte",
"[",
"]",
">",
"previousBytes",
"=",
"new",
"ArrayList",
"<",
"byte",
"[",
"]",
">",
"(",
")",
";",
"byte",
"[",
"]",
"cur... | Drains an input stream into a byte array. The given input stream is not closed.
@param inputStream The input stream to drain.
@return A byte array containing the content of the input stream.
@throws IOException If the stream reading causes an error. | [
"Drains",
"an",
"input",
"stream",
"into",
"a",
"byte",
"array",
".",
"The",
"given",
"input",
"stream",
"is",
"not",
"closed",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/StreamDrainer.java#L79-L100 |
22,735 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/Nexus.java | Nexus.nonAnonymous | private static String nonAnonymous(String typeName) {
int anonymousLoaderIndex = typeName.indexOf('/');
return anonymousLoaderIndex == -1
? typeName
: typeName.substring(0, anonymousLoaderIndex);
} | java | private static String nonAnonymous(String typeName) {
int anonymousLoaderIndex = typeName.indexOf('/');
return anonymousLoaderIndex == -1
? typeName
: typeName.substring(0, anonymousLoaderIndex);
} | [
"private",
"static",
"String",
"nonAnonymous",
"(",
"String",
"typeName",
")",
"{",
"int",
"anonymousLoaderIndex",
"=",
"typeName",
".",
"indexOf",
"(",
"'",
"'",
")",
";",
"return",
"anonymousLoaderIndex",
"==",
"-",
"1",
"?",
"typeName",
":",
"typeName",
"... | Normalizes a type name if it is loaded by an anonymous class loader.
@param typeName The name as returned by {@link Class#getName()}.
@return The non-anonymous name of the given class. | [
"Normalizes",
"a",
"type",
"name",
"if",
"it",
"is",
"loaded",
"by",
"an",
"anonymous",
"class",
"loader",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/Nexus.java#L111-L116 |
22,736 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/ExceptionTableSensitiveMethodVisitor.java | ExceptionTableSensitiveMethodVisitor.onVisitFieldInsn | protected void onVisitFieldInsn(int opcode, String owner, String name, String descriptor) {
super.visitFieldInsn(opcode, owner, name, descriptor);
} | java | protected void onVisitFieldInsn(int opcode, String owner, String name, String descriptor) {
super.visitFieldInsn(opcode, owner, name, descriptor);
} | [
"protected",
"void",
"onVisitFieldInsn",
"(",
"int",
"opcode",
",",
"String",
"owner",
",",
"String",
"name",
",",
"String",
"descriptor",
")",
"{",
"super",
".",
"visitFieldInsn",
"(",
"opcode",
",",
"owner",
",",
"name",
",",
"descriptor",
")",
";",
"}"
... | Visits a field instruction.
@param opcode The visited opcode.
@param owner The field's owner.
@param name The field's name.
@param descriptor The field's descriptor. | [
"Visits",
"a",
"field",
"instruction",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/ExceptionTableSensitiveMethodVisitor.java#L138-L140 |
22,737 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/ExceptionTableSensitiveMethodVisitor.java | ExceptionTableSensitiveMethodVisitor.onVisitTableSwitchInsn | protected void onVisitTableSwitchInsn(int minimum, int maximum, Label defaultTarget, Label... label) {
super.visitTableSwitchInsn(minimum, maximum, defaultTarget, label);
} | java | protected void onVisitTableSwitchInsn(int minimum, int maximum, Label defaultTarget, Label... label) {
super.visitTableSwitchInsn(minimum, maximum, defaultTarget, label);
} | [
"protected",
"void",
"onVisitTableSwitchInsn",
"(",
"int",
"minimum",
",",
"int",
"maximum",
",",
"Label",
"defaultTarget",
",",
"Label",
"...",
"label",
")",
"{",
"super",
".",
"visitTableSwitchInsn",
"(",
"minimum",
",",
"maximum",
",",
"defaultTarget",
",",
... | Visits a table switch instruction.
@param minimum The minimum index.
@param maximum The maximum index.
@param defaultTarget A label indicating the default value.
@param label Labels indicating the jump targets. | [
"Visits",
"a",
"table",
"switch",
"instruction",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/ExceptionTableSensitiveMethodVisitor.java#L262-L264 |
22,738 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/ExceptionTableSensitiveMethodVisitor.java | ExceptionTableSensitiveMethodVisitor.onVisitLookupSwitchInsn | protected void onVisitLookupSwitchInsn(Label defaultTarget, int[] key, Label[] label) {
super.visitLookupSwitchInsn(defaultTarget, key, label);
} | java | protected void onVisitLookupSwitchInsn(Label defaultTarget, int[] key, Label[] label) {
super.visitLookupSwitchInsn(defaultTarget, key, label);
} | [
"protected",
"void",
"onVisitLookupSwitchInsn",
"(",
"Label",
"defaultTarget",
",",
"int",
"[",
"]",
"key",
",",
"Label",
"[",
"]",
"label",
")",
"{",
"super",
".",
"visitLookupSwitchInsn",
"(",
"defaultTarget",
",",
"key",
",",
"label",
")",
";",
"}"
] | Visits a lookup switch instruction.
@param defaultTarget The default option.
@param key The key values.
@param label The targets for each key. | [
"Visits",
"a",
"lookup",
"switch",
"instruction",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/ExceptionTableSensitiveMethodVisitor.java#L279-L281 |
22,739 | raphw/byte-buddy | byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/AbstractUserConfiguration.java | AbstractUserConfiguration.getGroupId | protected String getGroupId(String groupId) {
return this.groupId == null || this.groupId.length() == 0
? groupId
: this.groupId;
} | java | protected String getGroupId(String groupId) {
return this.groupId == null || this.groupId.length() == 0
? groupId
: this.groupId;
} | [
"protected",
"String",
"getGroupId",
"(",
"String",
"groupId",
")",
"{",
"return",
"this",
".",
"groupId",
"==",
"null",
"||",
"this",
".",
"groupId",
".",
"length",
"(",
")",
"==",
"0",
"?",
"groupId",
":",
"this",
".",
"groupId",
";",
"}"
] | Returns the group id to use.
@param groupId The current project's group id.
@return The group id to use. | [
"Returns",
"the",
"group",
"id",
"to",
"use",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/AbstractUserConfiguration.java#L52-L56 |
22,740 | raphw/byte-buddy | byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/AbstractUserConfiguration.java | AbstractUserConfiguration.getArtifactId | protected String getArtifactId(String artifactId) {
return this.artifactId == null || this.artifactId.length() == 0
? artifactId
: this.artifactId;
} | java | protected String getArtifactId(String artifactId) {
return this.artifactId == null || this.artifactId.length() == 0
? artifactId
: this.artifactId;
} | [
"protected",
"String",
"getArtifactId",
"(",
"String",
"artifactId",
")",
"{",
"return",
"this",
".",
"artifactId",
"==",
"null",
"||",
"this",
".",
"artifactId",
".",
"length",
"(",
")",
"==",
"0",
"?",
"artifactId",
":",
"this",
".",
"artifactId",
";",
... | Returns the artifact id to use.
@param artifactId The current project's artifact id.
@return The artifact id to use. | [
"Returns",
"the",
"artifact",
"id",
"to",
"use",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/AbstractUserConfiguration.java#L64-L68 |
22,741 | raphw/byte-buddy | byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/AbstractUserConfiguration.java | AbstractUserConfiguration.asCoordinate | public MavenCoordinate asCoordinate(String groupId, String artifactId, String version, String packaging) {
return new MavenCoordinate(getGroupId(groupId), getArtifactId(artifactId), getVersion(version), getPackaging(packaging));
} | java | public MavenCoordinate asCoordinate(String groupId, String artifactId, String version, String packaging) {
return new MavenCoordinate(getGroupId(groupId), getArtifactId(artifactId), getVersion(version), getPackaging(packaging));
} | [
"public",
"MavenCoordinate",
"asCoordinate",
"(",
"String",
"groupId",
",",
"String",
"artifactId",
",",
"String",
"version",
",",
"String",
"packaging",
")",
"{",
"return",
"new",
"MavenCoordinate",
"(",
"getGroupId",
"(",
"groupId",
")",
",",
"getArtifactId",
... | Resolves this transformation to a Maven coordinate.
@param groupId The current project's build id.
@param artifactId The current project's artifact id.
@param version The current project's version.
@param packaging The current project's packaging
@return The resolved Maven coordinate. | [
"Resolves",
"this",
"transformation",
"to",
"a",
"Maven",
"coordinate",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/AbstractUserConfiguration.java#L104-L106 |
22,742 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/inline/InliningImplementationMatcher.java | InliningImplementationMatcher.of | protected static LatentMatcher<MethodDescription> of(LatentMatcher<? super MethodDescription> ignoredMethods, TypeDescription originalType) {
ElementMatcher.Junction<MethodDescription> predefinedMethodSignatures = none();
for (MethodDescription methodDescription : originalType.getDeclaredMethods()) {
... | java | protected static LatentMatcher<MethodDescription> of(LatentMatcher<? super MethodDescription> ignoredMethods, TypeDescription originalType) {
ElementMatcher.Junction<MethodDescription> predefinedMethodSignatures = none();
for (MethodDescription methodDescription : originalType.getDeclaredMethods()) {
... | [
"protected",
"static",
"LatentMatcher",
"<",
"MethodDescription",
">",
"of",
"(",
"LatentMatcher",
"<",
"?",
"super",
"MethodDescription",
">",
"ignoredMethods",
",",
"TypeDescription",
"originalType",
")",
"{",
"ElementMatcher",
".",
"Junction",
"<",
"MethodDescripti... | Creates a matcher where only overridable or declared methods are matched unless those are ignored. Methods that
are declared by the target type are only matched if they are not ignored. Declared methods that are not found on the
target type are always matched.
@param ignoredMethods A method matcher that matches any ig... | [
"Creates",
"a",
"matcher",
"where",
"only",
"overridable",
"or",
"declared",
"methods",
"are",
"matched",
"unless",
"those",
"are",
"ignored",
".",
"Methods",
"that",
"are",
"declared",
"by",
"the",
"target",
"type",
"are",
"only",
"matched",
"if",
"they",
"... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/inline/InliningImplementationMatcher.java#L64-L75 |
22,743 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java | ClassReloadingStrategy.reset | public ClassReloadingStrategy reset(Class<?>... type) throws IOException {
return type.length == 0
? this
: reset(ClassFileLocator.ForClassLoader.of(type[0].getClassLoader()), type);
} | java | public ClassReloadingStrategy reset(Class<?>... type) throws IOException {
return type.length == 0
? this
: reset(ClassFileLocator.ForClassLoader.of(type[0].getClassLoader()), type);
} | [
"public",
"ClassReloadingStrategy",
"reset",
"(",
"Class",
"<",
"?",
">",
"...",
"type",
")",
"throws",
"IOException",
"{",
"return",
"type",
".",
"length",
"==",
"0",
"?",
"this",
":",
"reset",
"(",
"ClassFileLocator",
".",
"ForClassLoader",
".",
"of",
"(... | Resets all classes to their original definition while using the first type's class loader as a class file locator.
@param type The types to reset.
@return This class reloading strategy.
@throws IOException If a class file locator causes an IO exception. | [
"Resets",
"all",
"classes",
"to",
"their",
"original",
"definition",
"while",
"using",
"the",
"first",
"type",
"s",
"class",
"loader",
"as",
"a",
"class",
"file",
"locator",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java#L246-L250 |
22,744 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java | ClassReloadingStrategy.reset | public ClassReloadingStrategy reset(ClassFileLocator classFileLocator, Class<?>... type) throws IOException {
if (type.length > 0) {
try {
strategy.reset(instrumentation, classFileLocator, Arrays.asList(type));
} catch (ClassNotFoundException exception) {
... | java | public ClassReloadingStrategy reset(ClassFileLocator classFileLocator, Class<?>... type) throws IOException {
if (type.length > 0) {
try {
strategy.reset(instrumentation, classFileLocator, Arrays.asList(type));
} catch (ClassNotFoundException exception) {
... | [
"public",
"ClassReloadingStrategy",
"reset",
"(",
"ClassFileLocator",
"classFileLocator",
",",
"Class",
"<",
"?",
">",
"...",
"type",
")",
"throws",
"IOException",
"{",
"if",
"(",
"type",
".",
"length",
">",
"0",
")",
"{",
"try",
"{",
"strategy",
".",
"res... | Resets all classes to their original definition.
@param classFileLocator The class file locator to use.
@param type The types to reset.
@return This class reloading strategy.
@throws IOException If a class file locator causes an IO exception. | [
"Resets",
"all",
"classes",
"to",
"their",
"original",
"definition",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java#L260-L271 |
22,745 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java | ClassReloadingStrategy.enableBootstrapInjection | public ClassReloadingStrategy enableBootstrapInjection(File folder) {
return new ClassReloadingStrategy(instrumentation, strategy, new BootstrapInjection.Enabled(folder), preregisteredTypes);
} | java | public ClassReloadingStrategy enableBootstrapInjection(File folder) {
return new ClassReloadingStrategy(instrumentation, strategy, new BootstrapInjection.Enabled(folder), preregisteredTypes);
} | [
"public",
"ClassReloadingStrategy",
"enableBootstrapInjection",
"(",
"File",
"folder",
")",
"{",
"return",
"new",
"ClassReloadingStrategy",
"(",
"instrumentation",
",",
"strategy",
",",
"new",
"BootstrapInjection",
".",
"Enabled",
"(",
"folder",
")",
",",
"preregister... | Enables bootstrap injection for this class reloading strategy.
@param folder The folder to save jar files in that are appended to the bootstrap class path.
@return A class reloading strategy with bootstrap injection enabled. | [
"Enables",
"bootstrap",
"injection",
"for",
"this",
"class",
"reloading",
"strategy",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java#L279-L281 |
22,746 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java | ClassReloadingStrategy.preregistered | public ClassReloadingStrategy preregistered(Class<?>... type) {
Map<String, Class<?>> preregisteredTypes = new HashMap<String, Class<?>>(this.preregisteredTypes);
for (Class<?> aType : type) {
preregisteredTypes.put(TypeDescription.ForLoadedType.getName(aType), aType);
}
retu... | java | public ClassReloadingStrategy preregistered(Class<?>... type) {
Map<String, Class<?>> preregisteredTypes = new HashMap<String, Class<?>>(this.preregisteredTypes);
for (Class<?> aType : type) {
preregisteredTypes.put(TypeDescription.ForLoadedType.getName(aType), aType);
}
retu... | [
"public",
"ClassReloadingStrategy",
"preregistered",
"(",
"Class",
"<",
"?",
">",
"...",
"type",
")",
"{",
"Map",
"<",
"String",
",",
"Class",
"<",
"?",
">",
">",
"preregisteredTypes",
"=",
"new",
"HashMap",
"<",
"String",
",",
"Class",
"<",
"?",
">",
... | Registers a type to be explicitly available without explicit lookup.
@param type The loaded types that are explicitly available.
@return This class reloading strategy with the given types being explicitly available. | [
"Registers",
"a",
"type",
"to",
"be",
"explicitly",
"available",
"without",
"explicit",
"lookup",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassReloadingStrategy.java#L289-L295 |
22,747 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/subclass/SubclassImplementationTarget.java | SubclassImplementationTarget.invokeConstructor | private Implementation.SpecialMethodInvocation invokeConstructor(MethodDescription.SignatureToken token) {
TypeDescription.Generic superClass = instrumentedType.getSuperClass();
MethodList<?> candidates = superClass == null
? new MethodList.Empty<MethodDescription.InGenericShape>()
... | java | private Implementation.SpecialMethodInvocation invokeConstructor(MethodDescription.SignatureToken token) {
TypeDescription.Generic superClass = instrumentedType.getSuperClass();
MethodList<?> candidates = superClass == null
? new MethodList.Empty<MethodDescription.InGenericShape>()
... | [
"private",
"Implementation",
".",
"SpecialMethodInvocation",
"invokeConstructor",
"(",
"MethodDescription",
".",
"SignatureToken",
"token",
")",
"{",
"TypeDescription",
".",
"Generic",
"superClass",
"=",
"instrumentedType",
".",
"getSuperClass",
"(",
")",
";",
"MethodLi... | Resolves a special method invocation for a constructor invocation.
@param token A token describing the constructor to be invoked.
@return A special method invocation for a constructor representing the given method token, if available. | [
"Resolves",
"a",
"special",
"method",
"invocation",
"for",
"a",
"constructor",
"invocation",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/subclass/SubclassImplementationTarget.java#L72-L80 |
22,748 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/subclass/SubclassImplementationTarget.java | SubclassImplementationTarget.invokeMethod | private Implementation.SpecialMethodInvocation invokeMethod(MethodDescription.SignatureToken token) {
MethodGraph.Node methodNode = methodGraph.getSuperClassGraph().locate(token);
return methodNode.getSort().isUnique()
? Implementation.SpecialMethodInvocation.Simple.of(methodNode.getRepr... | java | private Implementation.SpecialMethodInvocation invokeMethod(MethodDescription.SignatureToken token) {
MethodGraph.Node methodNode = methodGraph.getSuperClassGraph().locate(token);
return methodNode.getSort().isUnique()
? Implementation.SpecialMethodInvocation.Simple.of(methodNode.getRepr... | [
"private",
"Implementation",
".",
"SpecialMethodInvocation",
"invokeMethod",
"(",
"MethodDescription",
".",
"SignatureToken",
"token",
")",
"{",
"MethodGraph",
".",
"Node",
"methodNode",
"=",
"methodGraph",
".",
"getSuperClassGraph",
"(",
")",
".",
"locate",
"(",
"t... | Resolves a special method invocation for a non-constructor invocation.
@param token A token describing the method to be invoked.
@return A special method invocation for a method representing the given method token, if available. | [
"Resolves",
"a",
"special",
"method",
"invocation",
"for",
"a",
"non",
"-",
"constructor",
"invocation",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/subclass/SubclassImplementationTarget.java#L88-L93 |
22,749 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java | ClassFileVersion.ofMinorMajor | public static ClassFileVersion ofMinorMajor(int versionNumber) {
ClassFileVersion classFileVersion = new ClassFileVersion(versionNumber);
if (classFileVersion.getMajorVersion() <= BASE_VERSION) {
throw new IllegalArgumentException("Class version " + versionNumber + " is not valid");
... | java | public static ClassFileVersion ofMinorMajor(int versionNumber) {
ClassFileVersion classFileVersion = new ClassFileVersion(versionNumber);
if (classFileVersion.getMajorVersion() <= BASE_VERSION) {
throw new IllegalArgumentException("Class version " + versionNumber + " is not valid");
... | [
"public",
"static",
"ClassFileVersion",
"ofMinorMajor",
"(",
"int",
"versionNumber",
")",
"{",
"ClassFileVersion",
"classFileVersion",
"=",
"new",
"ClassFileVersion",
"(",
"versionNumber",
")",
";",
"if",
"(",
"classFileVersion",
".",
"getMajorVersion",
"(",
")",
"<... | Creates a wrapper for a given minor-major release of the Java class file file.
@param versionNumber The minor-major release number.
@return A representation of the version number. | [
"Creates",
"a",
"wrapper",
"for",
"a",
"given",
"minor",
"-",
"major",
"release",
"of",
"the",
"Java",
"class",
"file",
"file",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java#L136-L142 |
22,750 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java | ClassFileVersion.ofJavaVersion | public static ClassFileVersion ofJavaVersion(int javaVersion) {
switch (javaVersion) {
case 1:
return JAVA_V1;
case 2:
return JAVA_V2;
case 3:
return JAVA_V3;
case 4:
return JAVA_V4;
case ... | java | public static ClassFileVersion ofJavaVersion(int javaVersion) {
switch (javaVersion) {
case 1:
return JAVA_V1;
case 2:
return JAVA_V2;
case 3:
return JAVA_V3;
case 4:
return JAVA_V4;
case ... | [
"public",
"static",
"ClassFileVersion",
"ofJavaVersion",
"(",
"int",
"javaVersion",
")",
"{",
"switch",
"(",
"javaVersion",
")",
"{",
"case",
"1",
":",
"return",
"JAVA_V1",
";",
"case",
"2",
":",
"return",
"JAVA_V2",
";",
"case",
"3",
":",
"return",
"JAVA_... | Creates a class file version for a given major release of Java. Currently, all versions reaching from
Java 1 to Java 9 are supported.
@param javaVersion The Java version.
@return A wrapper for the given Java class file version. | [
"Creates",
"a",
"class",
"file",
"version",
"for",
"a",
"given",
"major",
"release",
"of",
"Java",
".",
"Currently",
"all",
"versions",
"reaching",
"from",
"Java",
"1",
"to",
"Java",
"9",
"are",
"supported",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/ClassFileVersion.java#L200-L235 |
22,751 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/StubInvocationBenchmark.java | StubInvocationBenchmark.baseline | @Benchmark
@OperationsPerInvocation(20)
public void baseline(Blackhole blackHole) {
blackHole.consume(baselineInstance.method(booleanValue));
blackHole.consume(baselineInstance.method(byteValue));
blackHole.consume(baselineInstance.method(shortValue));
blackHole.consume(baselineI... | java | @Benchmark
@OperationsPerInvocation(20)
public void baseline(Blackhole blackHole) {
blackHole.consume(baselineInstance.method(booleanValue));
blackHole.consume(baselineInstance.method(byteValue));
blackHole.consume(baselineInstance.method(shortValue));
blackHole.consume(baselineI... | [
"@",
"Benchmark",
"@",
"OperationsPerInvocation",
"(",
"20",
")",
"public",
"void",
"baseline",
"(",
"Blackhole",
"blackHole",
")",
"{",
"blackHole",
".",
"consume",
"(",
"baselineInstance",
".",
"method",
"(",
"booleanValue",
")",
")",
";",
"blackHole",
".",
... | Performs a benchmark for a casual class as a baseline.
@param blackHole A black hole for avoiding JIT erasure. | [
"Performs",
"a",
"benchmark",
"for",
"a",
"casual",
"class",
"as",
"a",
"baseline",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/StubInvocationBenchmark.java#L131-L154 |
22,752 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/StubInvocationBenchmark.java | StubInvocationBenchmark.benchmarkJavassist | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkJavassist(Blackhole blackHole) {
blackHole.consume(javassistInstance.method(booleanValue));
blackHole.consume(javassistInstance.method(byteValue));
blackHole.consume(javassistInstance.method(shortValue));
blackHole.cons... | java | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkJavassist(Blackhole blackHole) {
blackHole.consume(javassistInstance.method(booleanValue));
blackHole.consume(javassistInstance.method(byteValue));
blackHole.consume(javassistInstance.method(shortValue));
blackHole.cons... | [
"@",
"Benchmark",
"@",
"OperationsPerInvocation",
"(",
"20",
")",
"public",
"void",
"benchmarkJavassist",
"(",
"Blackhole",
"blackHole",
")",
"{",
"blackHole",
".",
"consume",
"(",
"javassistInstance",
".",
"method",
"(",
"booleanValue",
")",
")",
";",
"blackHol... | Performs a benchmark for a trivial class creation using javassist.
@param blackHole A black hole for avoiding JIT erasure. | [
"Performs",
"a",
"benchmark",
"for",
"a",
"trivial",
"class",
"creation",
"using",
"javassist",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/StubInvocationBenchmark.java#L221-L244 |
22,753 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/StubInvocationBenchmark.java | StubInvocationBenchmark.benchmarkJdkProxy | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkJdkProxy(Blackhole blackHole) {
blackHole.consume(jdkProxyInstance.method(booleanValue));
blackHole.consume(jdkProxyInstance.method(byteValue));
blackHole.consume(jdkProxyInstance.method(shortValue));
blackHole.consume(... | java | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkJdkProxy(Blackhole blackHole) {
blackHole.consume(jdkProxyInstance.method(booleanValue));
blackHole.consume(jdkProxyInstance.method(byteValue));
blackHole.consume(jdkProxyInstance.method(shortValue));
blackHole.consume(... | [
"@",
"Benchmark",
"@",
"OperationsPerInvocation",
"(",
"20",
")",
"public",
"void",
"benchmarkJdkProxy",
"(",
"Blackhole",
"blackHole",
")",
"{",
"blackHole",
".",
"consume",
"(",
"jdkProxyInstance",
".",
"method",
"(",
"booleanValue",
")",
")",
";",
"blackHole"... | Performs a benchmark for a trivial class creation using the Java Class Library's utilities.
@param blackHole A black hole for avoiding JIT erasure. | [
"Performs",
"a",
"benchmark",
"for",
"a",
"trivial",
"class",
"creation",
"using",
"the",
"Java",
"Class",
"Library",
"s",
"utilities",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/StubInvocationBenchmark.java#L251-L274 |
22,754 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassInjector.java | UsingLookup.of | public static UsingLookup of(Object lookup) {
if (!DISPATCHER.isAlive()) {
throw new IllegalStateException("The current VM does not support class definition via method handle lookups");
} else if (!JavaType.METHOD_HANDLES_LOOKUP.isInstance(lookup)) {
throw new Ill... | java | public static UsingLookup of(Object lookup) {
if (!DISPATCHER.isAlive()) {
throw new IllegalStateException("The current VM does not support class definition via method handle lookups");
} else if (!JavaType.METHOD_HANDLES_LOOKUP.isInstance(lookup)) {
throw new Ill... | [
"public",
"static",
"UsingLookup",
"of",
"(",
"Object",
"lookup",
")",
"{",
"if",
"(",
"!",
"DISPATCHER",
".",
"isAlive",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"The current VM does not support class definition via method handle lookups\"",
... | Creates class injector that defines a class using a method handle lookup.
@param lookup The {@code java.lang.invoke.MethodHandles$Lookup} instance to use.
@return An appropriate class injector. | [
"Creates",
"class",
"injector",
"that",
"defines",
"a",
"class",
"using",
"a",
"method",
"handle",
"lookup",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassInjector.java#L1370-L1379 |
22,755 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassInjector.java | UsingInstrumentation.of | public static ClassInjector of(File folder, Target target, Instrumentation instrumentation) {
return new UsingInstrumentation(folder, target, instrumentation, new RandomString());
} | java | public static ClassInjector of(File folder, Target target, Instrumentation instrumentation) {
return new UsingInstrumentation(folder, target, instrumentation, new RandomString());
} | [
"public",
"static",
"ClassInjector",
"of",
"(",
"File",
"folder",
",",
"Target",
"target",
",",
"Instrumentation",
"instrumentation",
")",
"{",
"return",
"new",
"UsingInstrumentation",
"(",
"folder",
",",
"target",
",",
"instrumentation",
",",
"new",
"RandomString... | Creates an instrumentation-based class injector.
@param folder The folder to be used for storing jar files.
@param target A representation of the target path to which classes are to be appended.
@param instrumentation The instrumentation to use for appending to the class path or the boot path.
@retur... | [
"Creates",
"an",
"instrumentation",
"-",
"based",
"class",
"injector",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/ClassInjector.java#L2114-L2116 |
22,756 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/OpenedClassReader.java | OpenedClassReader.of | public static ClassReader of(byte[] binaryRepresentation) {
if (EXPERIMENTAL) {
byte[] actualVersion = new byte[]{binaryRepresentation[4], binaryRepresentation[5], binaryRepresentation[6], binaryRepresentation[7]};
binaryRepresentation[4] = (byte) (Opcodes.V12 >>> 24);
binary... | java | public static ClassReader of(byte[] binaryRepresentation) {
if (EXPERIMENTAL) {
byte[] actualVersion = new byte[]{binaryRepresentation[4], binaryRepresentation[5], binaryRepresentation[6], binaryRepresentation[7]};
binaryRepresentation[4] = (byte) (Opcodes.V12 >>> 24);
binary... | [
"public",
"static",
"ClassReader",
"of",
"(",
"byte",
"[",
"]",
"binaryRepresentation",
")",
"{",
"if",
"(",
"EXPERIMENTAL",
")",
"{",
"byte",
"[",
"]",
"actualVersion",
"=",
"new",
"byte",
"[",
"]",
"{",
"binaryRepresentation",
"[",
"4",
"]",
",",
"bina... | Creates a class reader for the given binary representation of a class file.
@param binaryRepresentation The binary representation of a class file to read.
@return An appropriate class reader. | [
"Creates",
"a",
"class",
"reader",
"for",
"the",
"given",
"binary",
"representation",
"of",
"a",
"class",
"file",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/OpenedClassReader.java#L71-L84 |
22,757 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/InvocationHandlerAdapter.java | InvocationHandlerAdapter.argumentValuesOf | private List<StackManipulation> argumentValuesOf(MethodDescription instrumentedMethod) {
TypeList.Generic parameterTypes = instrumentedMethod.getParameters().asTypeList();
List<StackManipulation> instruction = new ArrayList<StackManipulation>(parameterTypes.size());
int currentIndex = 1;
... | java | private List<StackManipulation> argumentValuesOf(MethodDescription instrumentedMethod) {
TypeList.Generic parameterTypes = instrumentedMethod.getParameters().asTypeList();
List<StackManipulation> instruction = new ArrayList<StackManipulation>(parameterTypes.size());
int currentIndex = 1;
... | [
"private",
"List",
"<",
"StackManipulation",
">",
"argumentValuesOf",
"(",
"MethodDescription",
"instrumentedMethod",
")",
"{",
"TypeList",
".",
"Generic",
"parameterTypes",
"=",
"instrumentedMethod",
".",
"getParameters",
"(",
")",
".",
"asTypeList",
"(",
")",
";",... | Returns a list of stack manipulations that loads all arguments of an instrumented method.
@param instrumentedMethod The method that is instrumented.
@return A list of stack manipulation that loads all arguments of an instrumented method. | [
"Returns",
"a",
"list",
"of",
"stack",
"manipulations",
"that",
"loads",
"all",
"arguments",
"of",
"an",
"instrumented",
"method",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/InvocationHandlerAdapter.java#L171-L182 |
22,758 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/InvocationHandlerAdapter.java | InvocationHandlerAdapter.apply | protected ByteCodeAppender.Size apply(MethodVisitor methodVisitor,
Context implementationContext,
MethodDescription instrumentedMethod,
StackManipulation preparingManipulation,
... | java | protected ByteCodeAppender.Size apply(MethodVisitor methodVisitor,
Context implementationContext,
MethodDescription instrumentedMethod,
StackManipulation preparingManipulation,
... | [
"protected",
"ByteCodeAppender",
".",
"Size",
"apply",
"(",
"MethodVisitor",
"methodVisitor",
",",
"Context",
"implementationContext",
",",
"MethodDescription",
"instrumentedMethod",
",",
"StackManipulation",
"preparingManipulation",
",",
"FieldDescription",
"fieldDescription",... | Applies an implementation that delegates to a invocation handler.
@param methodVisitor The method visitor for writing the byte code to.
@param implementationContext The implementation context for the current implementation.
@param instrumentedMethod The method that is instrumented.
@param preparingManipulat... | [
"Applies",
"an",
"implementation",
"that",
"delegates",
"to",
"a",
"invocation",
"handler",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/InvocationHandlerAdapter.java#L218-L240 |
22,759 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/asm/TypeReferenceAdjustment.java | TypeReferenceAdjustment.filter | public TypeReferenceAdjustment filter(ElementMatcher<? super TypeDescription> filter) {
return new TypeReferenceAdjustment(strict, this.filter.<TypeDescription>or(filter));
} | java | public TypeReferenceAdjustment filter(ElementMatcher<? super TypeDescription> filter) {
return new TypeReferenceAdjustment(strict, this.filter.<TypeDescription>or(filter));
} | [
"public",
"TypeReferenceAdjustment",
"filter",
"(",
"ElementMatcher",
"<",
"?",
"super",
"TypeDescription",
">",
"filter",
")",
"{",
"return",
"new",
"TypeReferenceAdjustment",
"(",
"strict",
",",
"this",
".",
"filter",
".",
"<",
"TypeDescription",
">",
"or",
"(... | Excludes all matched types from being added as an attribute.
@param filter A filter for excluding types from the attribute generation.
@return A new type reference adjustment that uses the supplied filter for excluding types. | [
"Excludes",
"all",
"matched",
"types",
"from",
"being",
"added",
"as",
"an",
"attribute",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/asm/TypeReferenceAdjustment.java#L91-L93 |
22,760 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/assign/InstanceCheck.java | InstanceCheck.of | public static StackManipulation of(TypeDescription typeDescription) {
if (typeDescription.isPrimitive()) {
throw new IllegalArgumentException("Cannot check an instance against a primitive type: " + typeDescription);
}
return new InstanceCheck(typeDescription);
} | java | public static StackManipulation of(TypeDescription typeDescription) {
if (typeDescription.isPrimitive()) {
throw new IllegalArgumentException("Cannot check an instance against a primitive type: " + typeDescription);
}
return new InstanceCheck(typeDescription);
} | [
"public",
"static",
"StackManipulation",
"of",
"(",
"TypeDescription",
"typeDescription",
")",
"{",
"if",
"(",
"typeDescription",
".",
"isPrimitive",
"(",
")",
")",
"{",
"throw",
"new",
"IllegalArgumentException",
"(",
"\"Cannot check an instance against a primitive type:... | Creates a new instance check.
@param typeDescription The type to apply the instance check against.
@return An appropriate stack manipulation. | [
"Creates",
"a",
"new",
"instance",
"check",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/assign/InstanceCheck.java#L51-L56 |
22,761 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/matcher/CachingMatcher.java | CachingMatcher.onCacheMiss | protected boolean onCacheMiss(T target) {
boolean cached = matcher.matches(target);
map.put(target, cached);
return cached;
} | java | protected boolean onCacheMiss(T target) {
boolean cached = matcher.matches(target);
map.put(target, cached);
return cached;
} | [
"protected",
"boolean",
"onCacheMiss",
"(",
"T",
"target",
")",
"{",
"boolean",
"cached",
"=",
"matcher",
".",
"matches",
"(",
"target",
")",
";",
"map",
".",
"put",
"(",
"target",
",",
"cached",
")",
";",
"return",
"cached",
";",
"}"
] | Invoked if the cache is not hit.
@param target The element to be matched.
@return {@code true} if the element is matched. | [
"Invoked",
"if",
"the",
"cache",
"is",
"not",
"hit",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/matcher/CachingMatcher.java#L72-L76 |
22,762 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/RandomString.java | RandomString.hashOf | public static String hashOf(int value) {
char[] buffer = new char[(Integer.SIZE / KEY_BITS) + ((Integer.SIZE % KEY_BITS) == 0 ? 0 : 1)];
for (int index = 0; index < buffer.length; index++) {
buffer[index] = SYMBOL[(value >>> index * KEY_BITS) & (-1 >>> (Integer.SIZE - KEY_BITS))];
}
... | java | public static String hashOf(int value) {
char[] buffer = new char[(Integer.SIZE / KEY_BITS) + ((Integer.SIZE % KEY_BITS) == 0 ? 0 : 1)];
for (int index = 0; index < buffer.length; index++) {
buffer[index] = SYMBOL[(value >>> index * KEY_BITS) & (-1 >>> (Integer.SIZE - KEY_BITS))];
}
... | [
"public",
"static",
"String",
"hashOf",
"(",
"int",
"value",
")",
"{",
"char",
"[",
"]",
"buffer",
"=",
"new",
"char",
"[",
"(",
"Integer",
".",
"SIZE",
"/",
"KEY_BITS",
")",
"+",
"(",
"(",
"Integer",
".",
"SIZE",
"%",
"KEY_BITS",
")",
"==",
"0",
... | Represents an integer value as a string hash. This string is not technically random but generates a fixed character
sequence based on the hash provided.
@param value The value to represent as a string.
@return A string representing the supplied value as a string. | [
"Represents",
"an",
"integer",
"value",
"as",
"a",
"string",
"hash",
".",
"This",
"string",
"is",
"not",
"technically",
"random",
"but",
"generates",
"a",
"fixed",
"character",
"sequence",
"based",
"on",
"the",
"hash",
"provided",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/RandomString.java#L116-L122 |
22,763 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/constant/MethodConstant.java | MethodConstant.of | public static CanCache of(MethodDescription.InDefinedShape methodDescription) {
if (methodDescription.isTypeInitializer()) {
return CanCacheIllegal.INSTANCE;
} else if (methodDescription.isConstructor()) {
return new ForConstructor(methodDescription);
} else {
... | java | public static CanCache of(MethodDescription.InDefinedShape methodDescription) {
if (methodDescription.isTypeInitializer()) {
return CanCacheIllegal.INSTANCE;
} else if (methodDescription.isConstructor()) {
return new ForConstructor(methodDescription);
} else {
... | [
"public",
"static",
"CanCache",
"of",
"(",
"MethodDescription",
".",
"InDefinedShape",
"methodDescription",
")",
"{",
"if",
"(",
"methodDescription",
".",
"isTypeInitializer",
"(",
")",
")",
"{",
"return",
"CanCacheIllegal",
".",
"INSTANCE",
";",
"}",
"else",
"i... | Creates a stack manipulation that loads a method constant onto the operand stack.
@param methodDescription The method to be loaded onto the stack.
@return A stack manipulation that assigns a method constant for the given method description. | [
"Creates",
"a",
"stack",
"manipulation",
"that",
"loads",
"a",
"method",
"constant",
"onto",
"the",
"operand",
"stack",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/constant/MethodConstant.java#L67-L75 |
22,764 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/constant/MethodConstant.java | MethodConstant.typeConstantsFor | protected static List<StackManipulation> typeConstantsFor(List<TypeDescription> parameterTypes) {
List<StackManipulation> typeConstants = new ArrayList<StackManipulation>(parameterTypes.size());
for (TypeDescription parameterType : parameterTypes) {
typeConstants.add(ClassConstant.of(paramet... | java | protected static List<StackManipulation> typeConstantsFor(List<TypeDescription> parameterTypes) {
List<StackManipulation> typeConstants = new ArrayList<StackManipulation>(parameterTypes.size());
for (TypeDescription parameterType : parameterTypes) {
typeConstants.add(ClassConstant.of(paramet... | [
"protected",
"static",
"List",
"<",
"StackManipulation",
">",
"typeConstantsFor",
"(",
"List",
"<",
"TypeDescription",
">",
"parameterTypes",
")",
"{",
"List",
"<",
"StackManipulation",
">",
"typeConstants",
"=",
"new",
"ArrayList",
"<",
"StackManipulation",
">",
... | Returns a list of type constant load operations for the given list of parameters.
@param parameterTypes A list of all type descriptions that should be represented as type constant
load operations.
@return A corresponding list of type constant load operations. | [
"Returns",
"a",
"list",
"of",
"type",
"constant",
"load",
"operations",
"for",
"the",
"given",
"list",
"of",
"parameters",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/constant/MethodConstant.java#L100-L106 |
22,765 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/TypeCache.java | TypeCache.insert | @SuppressFBWarnings(value = "GC_UNRELATED_TYPES", justification = "Cross-comparison is intended")
public Class<?> insert(ClassLoader classLoader, T key, Class<?> type) {
ConcurrentMap<T, Reference<Class<?>>> storage = cache.get(new LookupKey(classLoader));
if (storage == null) {
storage ... | java | @SuppressFBWarnings(value = "GC_UNRELATED_TYPES", justification = "Cross-comparison is intended")
public Class<?> insert(ClassLoader classLoader, T key, Class<?> type) {
ConcurrentMap<T, Reference<Class<?>>> storage = cache.get(new LookupKey(classLoader));
if (storage == null) {
storage ... | [
"@",
"SuppressFBWarnings",
"(",
"value",
"=",
"\"GC_UNRELATED_TYPES\"",
",",
"justification",
"=",
"\"Cross-comparison is intended\"",
")",
"public",
"Class",
"<",
"?",
">",
"insert",
"(",
"ClassLoader",
"classLoader",
",",
"T",
"key",
",",
"Class",
"<",
"?",
">... | Inserts a new type into the cache. If a type with the same class loader and key was inserted previously, the cache is not updated.
@param classLoader The class loader for which this type is stored.
@param key The key for the type in question.
@param type The type to insert of no previous type was stored... | [
"Inserts",
"a",
"new",
"type",
"into",
"the",
"cache",
".",
"If",
"a",
"type",
"with",
"the",
"same",
"class",
"loader",
"and",
"key",
"was",
"inserted",
"previously",
"the",
"cache",
"is",
"not",
"updated",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/TypeCache.java#L111-L136 |
22,766 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/SuperClassInvocationBenchmark.java | SuperClassInvocationBenchmark.benchmarkByteBuddyWithProxy | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkByteBuddyWithProxy(Blackhole blackHole) {
blackHole.consume(byteBuddyWithProxyInstance.method(booleanValue));
blackHole.consume(byteBuddyWithProxyInstance.method(byteValue));
blackHole.consume(byteBuddyWithProxyInstance.method(... | java | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkByteBuddyWithProxy(Blackhole blackHole) {
blackHole.consume(byteBuddyWithProxyInstance.method(booleanValue));
blackHole.consume(byteBuddyWithProxyInstance.method(byteValue));
blackHole.consume(byteBuddyWithProxyInstance.method(... | [
"@",
"Benchmark",
"@",
"OperationsPerInvocation",
"(",
"20",
")",
"public",
"void",
"benchmarkByteBuddyWithProxy",
"(",
"Blackhole",
"blackHole",
")",
"{",
"blackHole",
".",
"consume",
"(",
"byteBuddyWithProxyInstance",
".",
"method",
"(",
"booleanValue",
")",
")",
... | Performs a benchmark of a super method invocation using Byte Buddy. This benchmark uses an annotation-based
approach which is more difficult to optimize by the JIT compiler.
@param blackHole A black hole for avoiding JIT erasure. | [
"Performs",
"a",
"benchmark",
"of",
"a",
"super",
"method",
"invocation",
"using",
"Byte",
"Buddy",
".",
"This",
"benchmark",
"uses",
"an",
"annotation",
"-",
"based",
"approach",
"which",
"is",
"more",
"difficult",
"to",
"optimize",
"by",
"the",
"JIT",
"com... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/SuperClassInvocationBenchmark.java#L178-L201 |
22,767 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/SuperClassInvocationBenchmark.java | SuperClassInvocationBenchmark.benchmarkByteBuddyWithAccessor | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkByteBuddyWithAccessor(Blackhole blackHole) {
blackHole.consume(byteBuddyWithAccessorInstance.method(booleanValue));
blackHole.consume(byteBuddyWithAccessorInstance.method(byteValue));
blackHole.consume(byteBuddyWithAccessorInst... | java | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkByteBuddyWithAccessor(Blackhole blackHole) {
blackHole.consume(byteBuddyWithAccessorInstance.method(booleanValue));
blackHole.consume(byteBuddyWithAccessorInstance.method(byteValue));
blackHole.consume(byteBuddyWithAccessorInst... | [
"@",
"Benchmark",
"@",
"OperationsPerInvocation",
"(",
"20",
")",
"public",
"void",
"benchmarkByteBuddyWithAccessor",
"(",
"Blackhole",
"blackHole",
")",
"{",
"blackHole",
".",
"consume",
"(",
"byteBuddyWithAccessorInstance",
".",
"method",
"(",
"booleanValue",
")",
... | Performs a benchmark of a super method invocation using Byte Buddy. This benchmark also uses the annotation-based approach
but creates delegation methods which do not require the creation of additional classes.
@param blackHole A black hole for avoiding JIT erasure. | [
"Performs",
"a",
"benchmark",
"of",
"a",
"super",
"method",
"invocation",
"using",
"Byte",
"Buddy",
".",
"This",
"benchmark",
"also",
"uses",
"the",
"annotation",
"-",
"based",
"approach",
"but",
"creates",
"delegation",
"methods",
"which",
"do",
"not",
"requi... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/SuperClassInvocationBenchmark.java#L209-L232 |
22,768 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/SuperClassInvocationBenchmark.java | SuperClassInvocationBenchmark.benchmarkByteBuddyWithPrefix | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkByteBuddyWithPrefix(Blackhole blackHole) {
blackHole.consume(byteBuddyWithPrefixInstance.method(booleanValue));
blackHole.consume(byteBuddyWithPrefixInstance.method(byteValue));
blackHole.consume(byteBuddyWithPrefixInstance.met... | java | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkByteBuddyWithPrefix(Blackhole blackHole) {
blackHole.consume(byteBuddyWithPrefixInstance.method(booleanValue));
blackHole.consume(byteBuddyWithPrefixInstance.method(byteValue));
blackHole.consume(byteBuddyWithPrefixInstance.met... | [
"@",
"Benchmark",
"@",
"OperationsPerInvocation",
"(",
"20",
")",
"public",
"void",
"benchmarkByteBuddyWithPrefix",
"(",
"Blackhole",
"blackHole",
")",
"{",
"blackHole",
".",
"consume",
"(",
"byteBuddyWithPrefixInstance",
".",
"method",
"(",
"booleanValue",
")",
")"... | Performs a benchmark of a super method invocation using Byte Buddy. This benchmark also uses the annotation-based approach
but hard-codes the super method call subsequently to the method.
@param blackHole A black hole for avoiding JIT erasure. | [
"Performs",
"a",
"benchmark",
"of",
"a",
"super",
"method",
"invocation",
"using",
"Byte",
"Buddy",
".",
"This",
"benchmark",
"also",
"uses",
"the",
"annotation",
"-",
"based",
"approach",
"but",
"hard",
"-",
"codes",
"the",
"super",
"method",
"call",
"subse... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/SuperClassInvocationBenchmark.java#L240-L263 |
22,769 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/SuperClassInvocationBenchmark.java | SuperClassInvocationBenchmark.benchmarkByteBuddySpecialized | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkByteBuddySpecialized(Blackhole blackHole) {
blackHole.consume(byteBuddySpecializedInstance.method(booleanValue));
blackHole.consume(byteBuddySpecializedInstance.method(byteValue));
blackHole.consume(byteBuddySpecializedInstance... | java | @Benchmark
@OperationsPerInvocation(20)
public void benchmarkByteBuddySpecialized(Blackhole blackHole) {
blackHole.consume(byteBuddySpecializedInstance.method(booleanValue));
blackHole.consume(byteBuddySpecializedInstance.method(byteValue));
blackHole.consume(byteBuddySpecializedInstance... | [
"@",
"Benchmark",
"@",
"OperationsPerInvocation",
"(",
"20",
")",
"public",
"void",
"benchmarkByteBuddySpecialized",
"(",
"Blackhole",
"blackHole",
")",
"{",
"blackHole",
".",
"consume",
"(",
"byteBuddySpecializedInstance",
".",
"method",
"(",
"booleanValue",
")",
"... | Performs a benchmark of a super method invocation using Byte Buddy. This benchmark uses a specialized
interception strategy which is easier to inline by the compiler.
@param blackHole A black hole for avoiding JIT erasure. | [
"Performs",
"a",
"benchmark",
"of",
"a",
"super",
"method",
"invocation",
"using",
"Byte",
"Buddy",
".",
"This",
"benchmark",
"uses",
"a",
"specialized",
"interception",
"strategy",
"which",
"is",
"easier",
"to",
"inline",
"by",
"the",
"compiler",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/SuperClassInvocationBenchmark.java#L271-L294 |
22,770 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberSubstitution.java | WithoutSpecification.replaceWithField | public MemberSubstitution replaceWithField(ElementMatcher<? super FieldDescription> matcher) {
return replaceWith(new Substitution.ForFieldAccess.OfMatchedField(matcher));
} | java | public MemberSubstitution replaceWithField(ElementMatcher<? super FieldDescription> matcher) {
return replaceWith(new Substitution.ForFieldAccess.OfMatchedField(matcher));
} | [
"public",
"MemberSubstitution",
"replaceWithField",
"(",
"ElementMatcher",
"<",
"?",
"super",
"FieldDescription",
">",
"matcher",
")",
"{",
"return",
"replaceWith",
"(",
"new",
"Substitution",
".",
"ForFieldAccess",
".",
"OfMatchedField",
"(",
"matcher",
")",
")",
... | Replaces any interaction with a matched byte code element with a non-static field access on the first
parameter of the matched element. When matching a non-static field access or method invocation, the
substituted field is located on the same receiver type as the original access. For static access, the
first argument i... | [
"Replaces",
"any",
"interaction",
"with",
"a",
"matched",
"byte",
"code",
"element",
"with",
"a",
"non",
"-",
"static",
"field",
"access",
"on",
"the",
"first",
"parameter",
"of",
"the",
"matched",
"element",
".",
"When",
"matching",
"a",
"non",
"-",
"stat... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberSubstitution.java#L340-L342 |
22,771 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberSubstitution.java | WithoutSpecification.replaceWithMethod | public MemberSubstitution replaceWithMethod(ElementMatcher<? super MethodDescription> matcher, MethodGraph.Compiler methodGraphCompiler) {
return replaceWith(new Substitution.ForMethodInvocation.OfMatchedMethod(matcher, methodGraphCompiler));
} | java | public MemberSubstitution replaceWithMethod(ElementMatcher<? super MethodDescription> matcher, MethodGraph.Compiler methodGraphCompiler) {
return replaceWith(new Substitution.ForMethodInvocation.OfMatchedMethod(matcher, methodGraphCompiler));
} | [
"public",
"MemberSubstitution",
"replaceWithMethod",
"(",
"ElementMatcher",
"<",
"?",
"super",
"MethodDescription",
">",
"matcher",
",",
"MethodGraph",
".",
"Compiler",
"methodGraphCompiler",
")",
"{",
"return",
"replaceWith",
"(",
"new",
"Substitution",
".",
"ForMeth... | Replaces any interaction with a matched byte code element with a non-static method access on the first
parameter of the matched element. When matching a non-static field access or method invocation, the
substituted method is located on the same receiver type as the original access. For static access, the
first argument... | [
"Replaces",
"any",
"interaction",
"with",
"a",
"matched",
"byte",
"code",
"element",
"with",
"a",
"non",
"-",
"static",
"method",
"access",
"on",
"the",
"first",
"parameter",
"of",
"the",
"matched",
"element",
".",
"When",
"matching",
"a",
"non",
"-",
"sta... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/asm/MemberSubstitution.java#L409-L411 |
22,772 | raphw/byte-buddy | byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/PluginArgument.java | PluginArgument.toArgumentResolver | public Plugin.Factory.UsingReflection.ArgumentResolver toArgumentResolver() {
return new Plugin.Factory.UsingReflection.ArgumentResolver.ForIndex.WithDynamicType(index, value);
} | java | public Plugin.Factory.UsingReflection.ArgumentResolver toArgumentResolver() {
return new Plugin.Factory.UsingReflection.ArgumentResolver.ForIndex.WithDynamicType(index, value);
} | [
"public",
"Plugin",
".",
"Factory",
".",
"UsingReflection",
".",
"ArgumentResolver",
"toArgumentResolver",
"(",
")",
"{",
"return",
"new",
"Plugin",
".",
"Factory",
".",
"UsingReflection",
".",
"ArgumentResolver",
".",
"ForIndex",
".",
"WithDynamicType",
"(",
"ind... | Resolves this plugin argument to an argument resolver.
@return An argument resolver that represents this plugin argument. | [
"Resolves",
"this",
"plugin",
"argument",
"to",
"an",
"argument",
"resolver",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/PluginArgument.java#L42-L44 |
22,773 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/CompoundList.java | CompoundList.of | public static <S> List<S> of(S left, List<? extends S> right) {
if (right.isEmpty()) {
return Collections.singletonList(left);
} else {
List<S> list = new ArrayList<S>(1 + right.size());
list.add(left);
list.addAll(right);
return list;
... | java | public static <S> List<S> of(S left, List<? extends S> right) {
if (right.isEmpty()) {
return Collections.singletonList(left);
} else {
List<S> list = new ArrayList<S>(1 + right.size());
list.add(left);
list.addAll(right);
return list;
... | [
"public",
"static",
"<",
"S",
">",
"List",
"<",
"S",
">",
"of",
"(",
"S",
"left",
",",
"List",
"<",
"?",
"extends",
"S",
">",
"right",
")",
"{",
"if",
"(",
"right",
".",
"isEmpty",
"(",
")",
")",
"{",
"return",
"Collections",
".",
"singletonList"... | Creates a list of a single element and another list.
@param left The left element.
@param right The right list.
@param <S> The type of the list's elements.
@return A compound list representing the element and the list. | [
"Creates",
"a",
"list",
"of",
"a",
"single",
"element",
"and",
"another",
"list",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/CompoundList.java#L42-L51 |
22,774 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/CompoundList.java | CompoundList.of | public static <S> List<S> of(List<? extends S> left, List<? extends S> right) {
List<S> list = new ArrayList<S>(left.size() + right.size());
list.addAll(left);
list.addAll(right);
return list;
} | java | public static <S> List<S> of(List<? extends S> left, List<? extends S> right) {
List<S> list = new ArrayList<S>(left.size() + right.size());
list.addAll(left);
list.addAll(right);
return list;
} | [
"public",
"static",
"<",
"S",
">",
"List",
"<",
"S",
">",
"of",
"(",
"List",
"<",
"?",
"extends",
"S",
">",
"left",
",",
"List",
"<",
"?",
"extends",
"S",
">",
"right",
")",
"{",
"List",
"<",
"S",
">",
"list",
"=",
"new",
"ArrayList",
"<",
"S... | Creates a list of a left and right list.
@param left The left list.
@param right The right list.
@param <S> The type of the list's elements.
@return A compound list representing the elements of both lists. | [
"Creates",
"a",
"list",
"of",
"a",
"left",
"and",
"right",
"list",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/CompoundList.java#L80-L85 |
22,775 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/description/type/TypeDescription.java | ForSignatureVisitor.onOwnableType | private void onOwnableType(Generic ownableType) {
Generic ownerType = ownableType.getOwnerType();
if (ownerType != null && ownerType.getSort().isParameterized()) {
onOwnableType(ownerType);
signatureVisitor.visitInnerClassType(ownab... | java | private void onOwnableType(Generic ownableType) {
Generic ownerType = ownableType.getOwnerType();
if (ownerType != null && ownerType.getSort().isParameterized()) {
onOwnableType(ownerType);
signatureVisitor.visitInnerClassType(ownab... | [
"private",
"void",
"onOwnableType",
"(",
"Generic",
"ownableType",
")",
"{",
"Generic",
"ownerType",
"=",
"ownableType",
".",
"getOwnerType",
"(",
")",
";",
"if",
"(",
"ownerType",
"!=",
"null",
"&&",
"ownerType",
".",
"getSort",
"(",
")",
".",
"isParameteri... | Visits a type which might define an owner type.
@param ownableType The visited generic type. | [
"Visits",
"a",
"type",
"which",
"might",
"define",
"an",
"owner",
"type",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/description/type/TypeDescription.java#L1705-L1716 |
22,776 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/constant/SerializedConstant.java | SerializedConstant.of | public static StackManipulation of(Serializable value) {
if (value == null) {
return NullConstant.INSTANCE;
}
try {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteAr... | java | public static StackManipulation of(Serializable value) {
if (value == null) {
return NullConstant.INSTANCE;
}
try {
ByteArrayOutputStream byteArrayOutputStream = new ByteArrayOutputStream();
ObjectOutputStream objectOutputStream = new ObjectOutputStream(byteAr... | [
"public",
"static",
"StackManipulation",
"of",
"(",
"Serializable",
"value",
")",
"{",
"if",
"(",
"value",
"==",
"null",
")",
"{",
"return",
"NullConstant",
".",
"INSTANCE",
";",
"}",
"try",
"{",
"ByteArrayOutputStream",
"byteArrayOutputStream",
"=",
"new",
"B... | Creates a new stack manipulation to load the supplied value onto the stack.
@param value The value to serialize.
@return A stack manipulation to serialize the supplied value. | [
"Creates",
"a",
"new",
"stack",
"manipulation",
"to",
"load",
"the",
"supplied",
"value",
"onto",
"the",
"stack",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/bytecode/constant/SerializedConstant.java#L61-L77 |
22,777 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaModule.java | JavaModule.addReads | public void addReads(Instrumentation instrumentation, JavaModule module) {
DISPATCHER.addReads(instrumentation, this.module, module.unwrap());
} | java | public void addReads(Instrumentation instrumentation, JavaModule module) {
DISPATCHER.addReads(instrumentation, this.module, module.unwrap());
} | [
"public",
"void",
"addReads",
"(",
"Instrumentation",
"instrumentation",
",",
"JavaModule",
"module",
")",
"{",
"DISPATCHER",
".",
"addReads",
"(",
"instrumentation",
",",
"this",
".",
"module",
",",
"module",
".",
"unwrap",
"(",
")",
")",
";",
"}"
] | Adds a read-edge to this module to the supplied module using the instrumentation API.
@param instrumentation The instrumentation instance to use for adding the edge.
@param module The module to add as a read dependency to this module. | [
"Adds",
"a",
"read",
"-",
"edge",
"to",
"this",
"module",
"to",
"the",
"supplied",
"module",
"using",
"the",
"instrumentation",
"API",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/JavaModule.java#L152-L154 |
22,778 | raphw/byte-buddy | byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/Initialization.java | Initialization.getEntryPoint | public EntryPoint getEntryPoint(ClassLoaderResolver classLoaderResolver, File root, Iterable<? extends File> classPath) {
if (entryPoint == null || entryPoint.length() == 0) {
throw new GradleException("Entry point name is not defined");
}
for (EntryPoint.Default entryPoint : EntryPo... | java | public EntryPoint getEntryPoint(ClassLoaderResolver classLoaderResolver, File root, Iterable<? extends File> classPath) {
if (entryPoint == null || entryPoint.length() == 0) {
throw new GradleException("Entry point name is not defined");
}
for (EntryPoint.Default entryPoint : EntryPo... | [
"public",
"EntryPoint",
"getEntryPoint",
"(",
"ClassLoaderResolver",
"classLoaderResolver",
",",
"File",
"root",
",",
"Iterable",
"<",
"?",
"extends",
"File",
">",
"classPath",
")",
"{",
"if",
"(",
"entryPoint",
"==",
"null",
"||",
"entryPoint",
".",
"length",
... | Resolves this initialization to an entry point instance.
@param classLoaderResolver The class loader resolver to use if appropriate.
@param root The root file describing the current tasks classes.
@param classPath The class path of the current task.
@return A resolved entry point. | [
"Resolves",
"this",
"initialization",
"to",
"an",
"entry",
"point",
"instance",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/Initialization.java#L61-L77 |
22,779 | raphw/byte-buddy | byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyExtension.java | ByteBuddyExtension.transformation | public void transformation(Closure<?> closure) {
transformations.add((Transformation) project.configure(new Transformation(project), closure));
} | java | public void transformation(Closure<?> closure) {
transformations.add((Transformation) project.configure(new Transformation(project), closure));
} | [
"public",
"void",
"transformation",
"(",
"Closure",
"<",
"?",
">",
"closure",
")",
"{",
"transformations",
".",
"add",
"(",
"(",
"Transformation",
")",
"project",
".",
"configure",
"(",
"new",
"Transformation",
"(",
"project",
")",
",",
"closure",
")",
")"... | Adds a transformation to apply.
@param closure The closure for configuring the transformation. | [
"Adds",
"a",
"transformation",
"to",
"apply",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyExtension.java#L90-L92 |
22,780 | raphw/byte-buddy | byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyExtension.java | ByteBuddyExtension.initialization | public void initialization(Closure<?> closure) {
if (initialization != null) {
throw new GradleException("Initialization is already set");
}
initialization = (Initialization) project.configure(new Initialization(), closure);
} | java | public void initialization(Closure<?> closure) {
if (initialization != null) {
throw new GradleException("Initialization is already set");
}
initialization = (Initialization) project.configure(new Initialization(), closure);
} | [
"public",
"void",
"initialization",
"(",
"Closure",
"<",
"?",
">",
"closure",
")",
"{",
"if",
"(",
"initialization",
"!=",
"null",
")",
"{",
"throw",
"new",
"GradleException",
"(",
"\"Initialization is already set\"",
")",
";",
"}",
"initialization",
"=",
"(",... | Adds an initialization to apply.
@param closure The closure for configuring the initialization. | [
"Adds",
"an",
"initialization",
"to",
"apply",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyExtension.java#L99-L104 |
22,781 | raphw/byte-buddy | byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyExtension.java | ByteBuddyExtension.getMethodNameTransformer | public MethodNameTransformer getMethodNameTransformer() {
return suffix == null || suffix.length() == 0
? MethodNameTransformer.Suffixing.withRandomSuffix()
: new MethodNameTransformer.Suffixing(suffix);
} | java | public MethodNameTransformer getMethodNameTransformer() {
return suffix == null || suffix.length() == 0
? MethodNameTransformer.Suffixing.withRandomSuffix()
: new MethodNameTransformer.Suffixing(suffix);
} | [
"public",
"MethodNameTransformer",
"getMethodNameTransformer",
"(",
")",
"{",
"return",
"suffix",
"==",
"null",
"||",
"suffix",
".",
"length",
"(",
")",
"==",
"0",
"?",
"MethodNameTransformer",
".",
"Suffixing",
".",
"withRandomSuffix",
"(",
")",
":",
"new",
"... | Returns the method name transformer to use.
@return The method name transformer to use. | [
"Returns",
"the",
"method",
"name",
"transformer",
"to",
"use",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-gradle-plugin/src/main/java/net/bytebuddy/build/gradle/ByteBuddyExtension.java#L131-L135 |
22,782 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java | ClassByImplementationBenchmark.setup | @Setup
public void setup() {
baseClassDescription = TypePool.Default.ofSystemLoader().describe(baseClass.getName()).resolve();
} | java | @Setup
public void setup() {
baseClassDescription = TypePool.Default.ofSystemLoader().describe(baseClass.getName()).resolve();
} | [
"@",
"Setup",
"public",
"void",
"setup",
"(",
")",
"{",
"baseClassDescription",
"=",
"TypePool",
".",
"Default",
".",
"ofSystemLoader",
"(",
")",
".",
"describe",
"(",
"baseClass",
".",
"getName",
"(",
")",
")",
".",
"resolve",
"(",
")",
";",
"}"
] | Sets up this benchmark. | [
"Sets",
"up",
"this",
"benchmark",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java#L186-L189 |
22,783 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java | ClassByImplementationBenchmark.baseline | @Benchmark
public ExampleInterface baseline() {
return new ExampleInterface() {
public boolean method(boolean arg) {
return false;
}
public byte method(byte arg) {
return 0;
}
public short method(short arg) {
... | java | @Benchmark
public ExampleInterface baseline() {
return new ExampleInterface() {
public boolean method(boolean arg) {
return false;
}
public byte method(byte arg) {
return 0;
}
public short method(short arg) {
... | [
"@",
"Benchmark",
"public",
"ExampleInterface",
"baseline",
"(",
")",
"{",
"return",
"new",
"ExampleInterface",
"(",
")",
"{",
"public",
"boolean",
"method",
"(",
"boolean",
"arg",
")",
"{",
"return",
"false",
";",
"}",
"public",
"byte",
"method",
"(",
"by... | Creates a baseline for the benchmark.
@return A simple object that is not transformed. | [
"Creates",
"a",
"baseline",
"for",
"the",
"benchmark",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java#L196-L271 |
22,784 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java | ClassByImplementationBenchmark.benchmarkByteBuddy | @Benchmark
public ExampleInterface benchmarkByteBuddy() throws Exception {
return new ByteBuddy()
.with(TypeValidation.DISABLED)
.ignore(none())
.subclass(baseClass)
.method(isDeclaredBy(baseClass)).intercept(StubMethod.INSTANCE)
... | java | @Benchmark
public ExampleInterface benchmarkByteBuddy() throws Exception {
return new ByteBuddy()
.with(TypeValidation.DISABLED)
.ignore(none())
.subclass(baseClass)
.method(isDeclaredBy(baseClass)).intercept(StubMethod.INSTANCE)
... | [
"@",
"Benchmark",
"public",
"ExampleInterface",
"benchmarkByteBuddy",
"(",
")",
"throws",
"Exception",
"{",
"return",
"new",
"ByteBuddy",
"(",
")",
".",
"with",
"(",
"TypeValidation",
".",
"DISABLED",
")",
".",
"ignore",
"(",
"none",
"(",
")",
")",
".",
"s... | Performs a benchmark of an interface implementation using Byte Buddy.
@return The created instance, in order to avoid JIT removal.
@throws java.lang.Exception If the reflective invocation causes an exception. | [
"Performs",
"a",
"benchmark",
"of",
"an",
"interface",
"implementation",
"using",
"Byte",
"Buddy",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java#L279-L291 |
22,785 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java | ClassByImplementationBenchmark.benchmarkCglib | @Benchmark
public ExampleInterface benchmarkCglib() {
Enhancer enhancer = new Enhancer();
enhancer.setUseCache(false);
enhancer.setClassLoader(newClassLoader());
enhancer.setSuperclass(baseClass);
CallbackHelper callbackHelper = new CallbackHelper(Object.class, new Class[]{ba... | java | @Benchmark
public ExampleInterface benchmarkCglib() {
Enhancer enhancer = new Enhancer();
enhancer.setUseCache(false);
enhancer.setClassLoader(newClassLoader());
enhancer.setSuperclass(baseClass);
CallbackHelper callbackHelper = new CallbackHelper(Object.class, new Class[]{ba... | [
"@",
"Benchmark",
"public",
"ExampleInterface",
"benchmarkCglib",
"(",
")",
"{",
"Enhancer",
"enhancer",
"=",
"new",
"Enhancer",
"(",
")",
";",
"enhancer",
".",
"setUseCache",
"(",
"false",
")",
";",
"enhancer",
".",
"setClassLoader",
"(",
"newClassLoader",
"(... | Performs a benchmark of an interface implementation using cglib.
@return The created instance, in order to avoid JIT removal. | [
"Performs",
"a",
"benchmark",
"of",
"an",
"interface",
"implementation",
"using",
"cglib",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java#L319-L341 |
22,786 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java | ClassByImplementationBenchmark.benchmarkJavassist | @Benchmark
public ExampleInterface benchmarkJavassist() throws Exception {
ProxyFactory proxyFactory = new ProxyFactory() {
protected ClassLoader getClassLoader() {
return newClassLoader();
}
};
proxyFactory.setUseCache(false);
proxyFactory.set... | java | @Benchmark
public ExampleInterface benchmarkJavassist() throws Exception {
ProxyFactory proxyFactory = new ProxyFactory() {
protected ClassLoader getClassLoader() {
return newClassLoader();
}
};
proxyFactory.setUseCache(false);
proxyFactory.set... | [
"@",
"Benchmark",
"public",
"ExampleInterface",
"benchmarkJavassist",
"(",
")",
"throws",
"Exception",
"{",
"ProxyFactory",
"proxyFactory",
"=",
"new",
"ProxyFactory",
"(",
")",
"{",
"protected",
"ClassLoader",
"getClassLoader",
"(",
")",
"{",
"return",
"newClassLoa... | Performs a benchmark of an interface implementation using javassist proxies.
@return The created instance, in order to avoid JIT removal.
@throws java.lang.Exception If the reflective invocation causes an exception. | [
"Performs",
"a",
"benchmark",
"of",
"an",
"interface",
"implementation",
"using",
"javassist",
"proxies",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java#L349-L397 |
22,787 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java | ClassByImplementationBenchmark.benchmarkJdkProxy | @Benchmark
public ExampleInterface benchmarkJdkProxy() throws Exception {
return (ExampleInterface) Proxy.newProxyInstance(newClassLoader(),
new Class<?>[]{baseClass},
new InvocationHandler() {
public Object invoke(Object proxy, Method method, Object[] arg... | java | @Benchmark
public ExampleInterface benchmarkJdkProxy() throws Exception {
return (ExampleInterface) Proxy.newProxyInstance(newClassLoader(),
new Class<?>[]{baseClass},
new InvocationHandler() {
public Object invoke(Object proxy, Method method, Object[] arg... | [
"@",
"Benchmark",
"public",
"ExampleInterface",
"benchmarkJdkProxy",
"(",
")",
"throws",
"Exception",
"{",
"return",
"(",
"ExampleInterface",
")",
"Proxy",
".",
"newProxyInstance",
"(",
"newClassLoader",
"(",
")",
",",
"new",
"Class",
"<",
"?",
">",
"[",
"]",
... | Performs a benchmark of an interface implementation using the Java Class Library's utilities.
@return The created instance, in order to avoid JIT removal.
@throws java.lang.Exception If the reflective invocation causes an exception. | [
"Performs",
"a",
"benchmark",
"of",
"an",
"interface",
"implementation",
"using",
"the",
"Java",
"Class",
"Library",
"s",
"utilities",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByImplementationBenchmark.java#L405-L436 |
22,788 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/subclass/SubclassDynamicTypeBuilder.java | SubclassDynamicTypeBuilder.applyConstructorStrategy | private InstrumentedType applyConstructorStrategy(InstrumentedType instrumentedType) {
if (!instrumentedType.isInterface()) {
for (MethodDescription.Token token : constructorStrategy.extractConstructors(instrumentedType)) {
instrumentedType = instrumentedType.withMethod(token);
... | java | private InstrumentedType applyConstructorStrategy(InstrumentedType instrumentedType) {
if (!instrumentedType.isInterface()) {
for (MethodDescription.Token token : constructorStrategy.extractConstructors(instrumentedType)) {
instrumentedType = instrumentedType.withMethod(token);
... | [
"private",
"InstrumentedType",
"applyConstructorStrategy",
"(",
"InstrumentedType",
"instrumentedType",
")",
"{",
"if",
"(",
"!",
"instrumentedType",
".",
"isInterface",
"(",
")",
")",
"{",
"for",
"(",
"MethodDescription",
".",
"Token",
"token",
":",
"constructorStr... | Applies this builder's constructor strategy to the given instrumented type.
@param instrumentedType The instrumented type to apply the constructor onto.
@return The instrumented type with the constructor strategy applied onto. | [
"Applies",
"this",
"builder",
"s",
"constructor",
"strategy",
"to",
"the",
"given",
"instrumented",
"type",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/scaffold/subclass/SubclassDynamicTypeBuilder.java#L234-L241 |
22,789 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/StackAwareMethodVisitor.java | StackAwareMethodVisitor.adjustStack | private void adjustStack(int delta, int offset) {
if (delta > 2) {
throw new IllegalStateException("Cannot push multiple values onto the operand stack: " + delta);
} else if (delta > 0) {
int position = current.size();
// The operand stack can legally underflow while ... | java | private void adjustStack(int delta, int offset) {
if (delta > 2) {
throw new IllegalStateException("Cannot push multiple values onto the operand stack: " + delta);
} else if (delta > 0) {
int position = current.size();
// The operand stack can legally underflow while ... | [
"private",
"void",
"adjustStack",
"(",
"int",
"delta",
",",
"int",
"offset",
")",
"{",
"if",
"(",
"delta",
">",
"2",
")",
"{",
"throw",
"new",
"IllegalStateException",
"(",
"\"Cannot push multiple values onto the operand stack: \"",
"+",
"delta",
")",
";",
"}",
... | Adjusts the current state of the operand stack.
@param delta The change of the current operation of the operand stack. Must not be larger than {@code 2}.
@param offset The offset of the value within the operand stack. Must be bigger then {@code 0} and smaller than
the current stack size. Only permitted if the supplie... | [
"Adjusts",
"the",
"current",
"state",
"of",
"the",
"operand",
"stack",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/StackAwareMethodVisitor.java#L99-L128 |
22,790 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/StackAwareMethodVisitor.java | StackAwareMethodVisitor.drainStack | public int drainStack(int store, int load, StackSize size) {
int difference = current.get(current.size() - 1).getSize() - size.getSize();
if (current.size() == 1 && difference == 0) {
return 0;
} else {
super.visitVarInsn(store, freeIndex);
if (difference == 1... | java | public int drainStack(int store, int load, StackSize size) {
int difference = current.get(current.size() - 1).getSize() - size.getSize();
if (current.size() == 1 && difference == 0) {
return 0;
} else {
super.visitVarInsn(store, freeIndex);
if (difference == 1... | [
"public",
"int",
"drainStack",
"(",
"int",
"store",
",",
"int",
"load",
",",
"StackSize",
"size",
")",
"{",
"int",
"difference",
"=",
"current",
".",
"get",
"(",
"current",
".",
"size",
"(",
")",
"-",
"1",
")",
".",
"getSize",
"(",
")",
"-",
"size"... | Drains the stack to only contain the top value. For this, the value on top of the stack is temporarily stored
in the local variable array until all values on the stack are popped off. Subsequently, the top value is pushed
back onto the operand stack.
@param store The opcode used for storing the top value.
@param load ... | [
"Drains",
"the",
"stack",
"to",
"only",
"contain",
"the",
"top",
"value",
".",
"For",
"this",
"the",
"value",
"on",
"top",
"of",
"the",
"stack",
"is",
"temporarily",
"stored",
"in",
"the",
"local",
"variable",
"array",
"until",
"all",
"values",
"on",
"th... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/StackAwareMethodVisitor.java#L147-L162 |
22,791 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/StackAwareMethodVisitor.java | StackAwareMethodVisitor.doDrain | private void doDrain(List<StackSize> stackSizes) {
ListIterator<StackSize> iterator = stackSizes.listIterator(stackSizes.size());
while (iterator.hasPrevious()) {
StackSize current = iterator.previous();
switch (current) {
case SINGLE:
super.vi... | java | private void doDrain(List<StackSize> stackSizes) {
ListIterator<StackSize> iterator = stackSizes.listIterator(stackSizes.size());
while (iterator.hasPrevious()) {
StackSize current = iterator.previous();
switch (current) {
case SINGLE:
super.vi... | [
"private",
"void",
"doDrain",
"(",
"List",
"<",
"StackSize",
">",
"stackSizes",
")",
"{",
"ListIterator",
"<",
"StackSize",
">",
"iterator",
"=",
"stackSizes",
".",
"listIterator",
"(",
"stackSizes",
".",
"size",
"(",
")",
")",
";",
"while",
"(",
"iterator... | Drains all supplied elements of the operand stack.
@param stackSizes The stack sizes of the elements to drain. | [
"Drains",
"all",
"supplied",
"elements",
"of",
"the",
"operand",
"stack",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/StackAwareMethodVisitor.java#L169-L184 |
22,792 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/StackAwareMethodVisitor.java | StackAwareMethodVisitor.register | public void register(Label label, List<StackSize> stackSizes) {
sizes.put(label, stackSizes);
} | java | public void register(Label label, List<StackSize> stackSizes) {
sizes.put(label, stackSizes);
} | [
"public",
"void",
"register",
"(",
"Label",
"label",
",",
"List",
"<",
"StackSize",
">",
"stackSizes",
")",
"{",
"sizes",
".",
"put",
"(",
"label",
",",
"stackSizes",
")",
";",
"}"
] | Explicitly registers a label to define a given stack state.
@param label The label to register a stack state for.
@param stackSizes The stack sizes to assume when reaching the supplied label. | [
"Explicitly",
"registers",
"a",
"label",
"to",
"define",
"a",
"given",
"stack",
"state",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/utility/visitor/StackAwareMethodVisitor.java#L192-L194 |
22,793 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/FixedValue.java | FixedValue.value | public static AssignerConfigurable value(TypeDescription fixedValue) {
return new ForPoolValue(ClassConstant.of(fixedValue), TypeDescription.CLASS);
} | java | public static AssignerConfigurable value(TypeDescription fixedValue) {
return new ForPoolValue(ClassConstant.of(fixedValue), TypeDescription.CLASS);
} | [
"public",
"static",
"AssignerConfigurable",
"value",
"(",
"TypeDescription",
"fixedValue",
")",
"{",
"return",
"new",
"ForPoolValue",
"(",
"ClassConstant",
".",
"of",
"(",
"fixedValue",
")",
",",
"TypeDescription",
".",
"CLASS",
")",
";",
"}"
] | Returns the given type in form of a loaded type. The value is loaded from the written class's constant pool.
@param fixedValue The type to return from the method.
@return An implementation for the given {@code value}. | [
"Returns",
"the",
"given",
"type",
"in",
"form",
"of",
"a",
"loaded",
"type",
".",
"The",
"value",
"is",
"loaded",
"from",
"the",
"written",
"class",
"s",
"constant",
"pool",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/FixedValue.java#L154-L156 |
22,794 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/implementation/FixedValue.java | FixedValue.apply | protected ByteCodeAppender.Size apply(MethodVisitor methodVisitor,
Context implementationContext,
MethodDescription instrumentedMethod,
TypeDescription.Generic fixedValueType,
... | java | protected ByteCodeAppender.Size apply(MethodVisitor methodVisitor,
Context implementationContext,
MethodDescription instrumentedMethod,
TypeDescription.Generic fixedValueType,
... | [
"protected",
"ByteCodeAppender",
".",
"Size",
"apply",
"(",
"MethodVisitor",
"methodVisitor",
",",
"Context",
"implementationContext",
",",
"MethodDescription",
"instrumentedMethod",
",",
"TypeDescription",
".",
"Generic",
"fixedValueType",
",",
"StackManipulation",
"valueL... | Blueprint method that for applying the actual implementation.
@param methodVisitor The method visitor to which the implementation is applied to.
@param implementationContext The implementation context for the given implementation.
@param instrumentedMethod The instrumented method that is target of the... | [
"Blueprint",
"method",
"that",
"for",
"applying",
"the",
"actual",
"implementation",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/implementation/FixedValue.java#L220-L235 |
22,795 | raphw/byte-buddy | byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/Initialization.java | Initialization.getEntryPoint | @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Applies Maven exception wrapper")
public EntryPoint getEntryPoint(ClassLoaderResolver classLoaderResolver, String groupId, String artifactId, String version, String packaging) throws MojoExecutionException {
if (entryPoint == null || entryP... | java | @SuppressFBWarnings(value = "REC_CATCH_EXCEPTION", justification = "Applies Maven exception wrapper")
public EntryPoint getEntryPoint(ClassLoaderResolver classLoaderResolver, String groupId, String artifactId, String version, String packaging) throws MojoExecutionException {
if (entryPoint == null || entryP... | [
"@",
"SuppressFBWarnings",
"(",
"value",
"=",
"\"REC_CATCH_EXCEPTION\"",
",",
"justification",
"=",
"\"Applies Maven exception wrapper\"",
")",
"public",
"EntryPoint",
"getEntryPoint",
"(",
"ClassLoaderResolver",
"classLoaderResolver",
",",
"String",
"groupId",
",",
"String... | Resolves the described entry point.
@param classLoaderResolver The class loader resolved to use.
@param groupId This project's group id.
@param artifactId This project's artifact id.
@param version This project's version id.
@param packaging This project's packaging
@return T... | [
"Resolves",
"the",
"described",
"entry",
"point",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-maven-plugin/src/main/java/net/bytebuddy/build/maven/Initialization.java#L55-L72 |
22,796 | raphw/byte-buddy | byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/InjectionClassLoader.java | InjectionClassLoader.defineClass | public Class<?> defineClass(String name, byte[] binaryRepresentation) throws ClassNotFoundException {
return defineClasses(Collections.singletonMap(name, binaryRepresentation)).get(name);
} | java | public Class<?> defineClass(String name, byte[] binaryRepresentation) throws ClassNotFoundException {
return defineClasses(Collections.singletonMap(name, binaryRepresentation)).get(name);
} | [
"public",
"Class",
"<",
"?",
">",
"defineClass",
"(",
"String",
"name",
",",
"byte",
"[",
"]",
"binaryRepresentation",
")",
"throws",
"ClassNotFoundException",
"{",
"return",
"defineClasses",
"(",
"Collections",
".",
"singletonMap",
"(",
"name",
",",
"binaryRepr... | Defines a new type to be loaded by this class loader.
@param name The name of the type.
@param binaryRepresentation The type's binary representation.
@return The defined class or a previously defined class.
@throws ClassNotFoundException If the class could not be loaded. | [
"Defines",
"a",
"new",
"type",
"to",
"be",
"loaded",
"by",
"this",
"class",
"loader",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-dep/src/main/java/net/bytebuddy/dynamic/loading/InjectionClassLoader.java#L68-L70 |
22,797 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByExtensionBenchmark.java | ClassByExtensionBenchmark.setup | @Setup
public void setup() {
proxyInterceptor = MethodDelegation.to(ByteBuddyProxyInterceptor.class);
accessInterceptor = MethodDelegation.to(ByteBuddyAccessInterceptor.class);
prefixInterceptor = MethodDelegation.to(ByteBuddyPrefixInterceptor.class);
baseClassDescription = TypePool.... | java | @Setup
public void setup() {
proxyInterceptor = MethodDelegation.to(ByteBuddyProxyInterceptor.class);
accessInterceptor = MethodDelegation.to(ByteBuddyAccessInterceptor.class);
prefixInterceptor = MethodDelegation.to(ByteBuddyPrefixInterceptor.class);
baseClassDescription = TypePool.... | [
"@",
"Setup",
"public",
"void",
"setup",
"(",
")",
"{",
"proxyInterceptor",
"=",
"MethodDelegation",
".",
"to",
"(",
"ByteBuddyProxyInterceptor",
".",
"class",
")",
";",
"accessInterceptor",
"=",
"MethodDelegation",
".",
"to",
"(",
"ByteBuddyAccessInterceptor",
".... | A setup method to create precomputed delegator. | [
"A",
"setup",
"method",
"to",
"create",
"precomputed",
"delegator",
"."
] | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByExtensionBenchmark.java#L139-L151 |
22,798 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByExtensionBenchmark.java | ClassByExtensionBenchmark.benchmarkByteBuddyWithProxyAndReusedDelegator | @Benchmark
public ExampleClass benchmarkByteBuddyWithProxyAndReusedDelegator() throws Exception {
return new ByteBuddy()
.with(TypeValidation.DISABLED)
.ignore(none())
.subclass(baseClass)
.method(isDeclaredBy(baseClass)).intercept(proxyInterce... | java | @Benchmark
public ExampleClass benchmarkByteBuddyWithProxyAndReusedDelegator() throws Exception {
return new ByteBuddy()
.with(TypeValidation.DISABLED)
.ignore(none())
.subclass(baseClass)
.method(isDeclaredBy(baseClass)).intercept(proxyInterce... | [
"@",
"Benchmark",
"public",
"ExampleClass",
"benchmarkByteBuddyWithProxyAndReusedDelegator",
"(",
")",
"throws",
"Exception",
"{",
"return",
"new",
"ByteBuddy",
"(",
")",
".",
"with",
"(",
"TypeValidation",
".",
"DISABLED",
")",
".",
"ignore",
"(",
"none",
"(",
... | Performs a benchmark of a class extension using Byte Buddy. This benchmark also uses the annotation-based approach
but creates delegation methods which do not require the creation of additional classes. This benchmark reuses a
precomputed delegator.
@return The created instance, in order to avoid JIT removal.
@throws ... | [
"Performs",
"a",
"benchmark",
"of",
"a",
"class",
"extension",
"using",
"Byte",
"Buddy",
".",
"This",
"benchmark",
"also",
"uses",
"the",
"annotation",
"-",
"based",
"approach",
"but",
"creates",
"delegation",
"methods",
"which",
"do",
"not",
"require",
"the",... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByExtensionBenchmark.java#L192-L204 |
22,799 | raphw/byte-buddy | byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByExtensionBenchmark.java | ClassByExtensionBenchmark.benchmarkByteBuddyWithAccessorWithTypePool | @Benchmark
public ExampleClass benchmarkByteBuddyWithAccessorWithTypePool() throws Exception {
return (ExampleClass) new ByteBuddy()
.with(TypeValidation.DISABLED)
.ignore(none())
.subclass(baseClassDescription)
.method(isDeclaredBy(baseClassDe... | java | @Benchmark
public ExampleClass benchmarkByteBuddyWithAccessorWithTypePool() throws Exception {
return (ExampleClass) new ByteBuddy()
.with(TypeValidation.DISABLED)
.ignore(none())
.subclass(baseClassDescription)
.method(isDeclaredBy(baseClassDe... | [
"@",
"Benchmark",
"public",
"ExampleClass",
"benchmarkByteBuddyWithAccessorWithTypePool",
"(",
")",
"throws",
"Exception",
"{",
"return",
"(",
"ExampleClass",
")",
"new",
"ByteBuddy",
"(",
")",
".",
"with",
"(",
"TypeValidation",
".",
"DISABLED",
")",
".",
"ignore... | Performs a benchmark of a class extension using Byte Buddy. This benchmark also uses the annotation-based approach
but creates delegation methods which do not require the creation of additional classes. This benchmark uses a type
pool to compare against usage of the reflection API.
@return The created instance, in ord... | [
"Performs",
"a",
"benchmark",
"of",
"a",
"class",
"extension",
"using",
"Byte",
"Buddy",
".",
"This",
"benchmark",
"also",
"uses",
"the",
"annotation",
"-",
"based",
"approach",
"but",
"creates",
"delegation",
"methods",
"which",
"do",
"not",
"require",
"the",... | 4d2dac80efb6bed89367567260f6811c2f712d12 | https://github.com/raphw/byte-buddy/blob/4d2dac80efb6bed89367567260f6811c2f712d12/byte-buddy-benchmark/src/main/java/net/bytebuddy/benchmark/ClassByExtensionBenchmark.java#L301-L313 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.