java_methods_style.java (3014B)
1 // VIM_TEST_SETUP let g:java_highlight_functions = 'style' 2 // VIM_TEST_SETUP let g:java_highlight_generics = 1 3 // VIM_TEST_SETUP set encoding=utf-8 termencoding=utf-8 4 import java.lang.annotation.ElementType; 5 import java.lang.annotation.Target; 6 7 abstract class StyleMethodsTests 8 { 9 // TYPES. 10 record Τʬ<α>(α a) { } 11 12 enum E 13 { 14 A("a"), B("b"), C("c"), D("d"), 15 E("e"), F("f"), G("g"), H("h"); 16 final String s; 17 private E(String s) { this.s = s; } 18 } 19 20 @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) 21 @java.lang.annotation.Repeatable(Tɐggablɘs.class) 22 @interface Tɐggablɘ 23 { 24 String[] value() default ""; 25 } 26 27 @Target({ElementType.METHOD, ElementType.CONSTRUCTOR}) 28 @interface Tɐggablɘs 29 { 30 Tɐggablɘ[] value(); 31 } 32 33 interface Stylable<Α> 34 { 35 default void ascii$0_() { } 36 default Α μʭʭ$0_() { return null; } 37 } 38 39 // FIELDS. 40 private static final Class<?> CLASS_LOCK = classLock(); 41 42 private final Object instanceLock = new Object(); 43 44 // CONSTRUCTORS. 45 @Tɐggablɘ @Tɐggablɘ protected StyleMethodsTests() { } 46 <T extends Comparable<T>> StyleMethodsTests(T t, Void v) { } 47 private <T extends Comparable<T>> StyleMethodsTests(T t) { } 48 49 // METHODS. 50 @Tɐggablɘ @Tɐggablɘ abstract void ascii$0_(//////////////// 51 ); 52 @Tɐggablɘ @Tɐggablɘ abstract <α, β> Τʬ<α> μʭʭ$0_( 53 @SuppressWarnings("bespoke") β b); 54 55 @Tɐggablɘ private native void ascii$1_(/*////////////*/); 56 @Tɐggablɘ private native <α, β> Τʬ<α>[] μʭʭ$1_( 57 java.util.function.Function<β, Τʬ<α>[]> ƒ); 58 59 void Ascii$2_() { } 60 <T, U extends Stylable<T>> void Μʭʭ$2_(U u) { } 61 62 static final native synchronized void ascii$98_(); 63 static final native synchronized <α, β> Τʬ<α>[][] μʭʭ$98_( 64 java.util.function.Function<β, Τʬ<α>[][]> ƒ); 65 66 @SuppressWarnings("strictfp") 67 protected static final synchronized strictfp void ascii$99_() 68 { ascii$98_(); } 69 70 @SuppressWarnings("strictfp") protected 71 static final synchronized strictfp <α, β> Τʬ<α>[] μʭʭ$99_( 72 java.util.function.Function<β, Τʬ<α>[][]> ƒ) 73 { 74 return 75 StyleMethodsTests.<α, β>μʭʭ$98_(ƒ)[0]; 76 } 77 78 public static Class<?> classLock() { return StyleMethodsTests.class; } 79 80 public <E extends Comparable<? super E>> java.util.List<E> filter( 81 java.util.function.Predicate<? super E> filter, 82 java.util.List<? extends E> cs) 83 { 84 return cs.stream().filter(filter) 85 .collect(java.util.stream.Collectors.toUnmodifiableList()); 86 } 87 88 @Override @SuppressWarnings("cast") 89 public String toString() { return (String) "StyleMethodsTests"; } 90 } 91 92 class StyleAlias<T> 93 { 94 final T name; StyleAlias(T name) { this.name = name; } 95 96 class Builder 97 { 98 final java.util.stream.Stream.Builder<T> builder = 99 java.util.stream.Stream.<T>builder(); 100 101 StyleAlias<T>.Builder add(T x) 102 { 103 builder.accept(x); 104 return this; 105 } 106 107 java.util.stream.Stream<T> build() 108 { 109 return builder.<T>build(); 110 } 111 } 112 113 static <A> StyleAlias<A>.Builder builder(A name) 114 { 115 return new StyleAlias<>(name).new Builder(); 116 } 117 }