github.com/google/flogger v0.0.0-20260721005956-c6fe648c6a3e
Java Class.forName referenceJava newInstance reference
SHA-256269189cbbfebf12c6926ecf4d604f8efec48cc294c532bb5a7a8a538b3d00bde
MaleculeO(As)H(Db)
Evidence
12:48… , either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16
17package com.google.common.flogger.backend;
18
19import static java.util.Objects.requireNonNull;
20import static org.objectweb.asm.Opcodes.ACC_FINAL;
21import static org.objectweb.asm.Opcodes.ACC_PRIVATE;
22import static org.objectweb.asm.Opcodes.ACC_PUBLIC;
23import static org.objectweb.asm.Opcodes.ACC_STATIC;
24import static org.objectweb.asm.Opcodes.ACC_SUPER;
25import static org.objectweb.asm.Opcodes.ACONST_NULL;
26import static org.objectweb.asm.Opcodes.ALOAD;
27import static org.objectweb.asm.Opcodes.ANEWARRAY;
28import static org.objectweb.asm.Opcodes.ARETURN;
29import static org.objectweb.asm.Opcodes.ASTORE;
30import static org.objectweb.asm.Opcodes.CHECKCAST;
31import static org.objectweb.asm.Opcodes.F_SAME1;
32import static org.objectweb.asm.Opcodes.ICONST_0;
33import static org.objectweb.asm.Opcodes.INVOKESPECIAL;
34import static org.objectweb.asm.Opcodes.INVOKEVIRTUAL;
35import static org.objectweb.asm.Opcodes.RETURN;
36import static org.objectweb.asm.Opcodes.V1_6;
37
38import java.io.IOException;
39import java.nio.file.Files;
40import java.nio.file.Path;
41import java.nio.file.Paths;
42import java.nio.file.StandardOpenOption;
43import java.util.jar.JarOutputStream;
44import java.util.zip.ZipEntry;
45import org.objectweb.asm.ClassWriter;
46import org.objectweb.asm.Label;
47import org.objectweb.asm.MethodVisitor;
48import org.objectweb.asm.Type;
49
50/**
51 * Class that generates a PlatformProvider class for creating instances of Platform, for use in
52 * Platform d …
82:14… itor.visitCode();
83 methodVisitor.visitVarInsn(ALOAD, 0);
84 methodVisitor.visitMethodInsn(INVOKESPECIAL, "java/lang/Object", "<init>", "()V", false);
85 methodVisitor.visitInsn(RETURN);
86 methodVisito …
112:25… ies(requireNonNull(path.getParent(), "path must have a parent: " + path));
113 try (JarOutputStream jar =
114 new JarOutputStream(Files.newOutputStream(path, StandardOpenOption.CREATE_NEW))) {
115 ZipEntry entry = new ZipEntry("com/google/common/flogg …
116:73… c for cache during builds.
117 jar.putNextEntry(entry);
118 jar.write(classWriter.toByteArray());
119 jar.closeEntry();
120 }
121 }
122
123 private static void tryBlockForPlatform(MethodVisitor meth …
155:9… return (Platform) PlatformClass.class.getDeclaredConstructor().newInstance();
156 //
157 // Note that the constructor call happens reflectively to make sure that the platform class
158 // isn't loaded u …
Showing the top 5 files — 4 more files (26 regions) not shown.
No evidence locations were recorded for this file. Raw result