This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Foo { | |
class Bar { | |
void qux(@TypeAnnotation Foo.@TypeAnnotation Bar this) { } // Foo is treated as owner type. | |
} | |
} | |
@Target(ElementType.TYPE_USE) | |
@Retention(RetentionPolicy.RUNTIME) | |
@interface TypeAnnotation { } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Foo<T> { | |
class Bar<S> { | |
Bar(Foo<T> Foo.this) {} | |
void bar(Foo<T>.Bar<S> this) {} | |
} | |
static class Qux<S> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class Foo<T> { | |
void foo(Foo<@Bar T> this) {} | |
public static void main(String[] args) { | |
assert Foo.class.getDeclaredMethod("foo").getAnnotatedReceiverType() instanceof AnnotatedParameterizedType; | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
import java.lang.reflect.AnnotatedParameterizedType; | |
import java.util.List; | |
import java.util.concurrent.Callable; | |
public class Foo<T extends List<@Sample ?> & Callable<@Sample ?>> { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
import java.lang.reflect.AnnotatedParameterizedType; | |
public class Foo<T> { | |
@Sample(1) Foo<@Sample(2) Void>.@Sample(3) Bar<@Sample(4) Void> field; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.bytebuddy.description; | |
import jdk.internal.org.objectweb.asm.TypeReference; | |
import java.lang.annotation.ElementType; | |
import java.lang.annotation.Retention; | |
import java.lang.annotation.RetentionPolicy; | |
import java.lang.annotation.Target; | |
import java.util.ArrayList; | |
import java.util.List; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"name": "app", | |
"version": "0.0.0", | |
"authors": [ | |
"foo <[email protected]>" | |
], | |
"license": "MIT", | |
"private": true, | |
"ignore": [ | |
"**/.*", |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.bytebuddy; | |
import net.bytebuddy.agent.ByteBuddyAgent; | |
import net.bytebuddy.agent.builder.AgentBuilder; | |
import net.bytebuddy.description.type.TypeDescription; | |
import net.bytebuddy.dynamic.DynamicType; | |
import net.bytebuddy.implementation.MethodDelegation; | |
import net.bytebuddy.implementation.bind.annotation.Origin; | |
import net.bytebuddy.implementation.bind.annotation.RuntimeType; | |
import net.bytebuddy.matcher.ElementMatchers; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package net.bytebuddy.bar; | |
public class Bar<T extends Baz> { | |
public void foo(T t) { } | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public class SealedQuirk { | |
private static final String FOO = "foo", BAR = "bar", TMP = "tmp"; | |
private ClassLoader singleClassLoader, sealedChildClassLoader, sealedParentClassLoader; | |
@Before | |
public void setUp() throws Exception { | |
File folder = Files.createTempDirectory(TMP).toFile(); |