MCPcopy Index your code
hub / github.com/Col-E/CAFED00D

github.com/Col-E/CAFED00D @2.6.5

Chat with this repo
repository ↗ · DeepWiki ↗ · release 2.6.5 ↗ · + Follow
1,687 symbols 4,116 edges 203 files 1,154 documented · 68% 1 cross-repo links
What it actually does AI analysis from the code graph — generated when you open this
loading…
README

CAFEDOOD

Another class library with a focus on obfuscation support.

Features

Usage

Add dependency

Add CafeDude dependency (where VERSION is the latest version)

<dependency>
    <groupId>software.coley</groupId>
    <artifactId>cafedude-core</artifactId>
    <version>VERSION</version>
</dependency>
implementation 'software.coley:cafedude-core:VERSION'

Reading and writing classes

The default settings have anti-obfuscation measures enabled.

// Reading
byte[] code = ...
ClassFileReader cr = new ClassFileReader();
// cr.setDropForwardVersioned(false) - enabled by default
// cr.setDropEofAttributes(false) - enabled by default
// cr.setDropDupeAnnotations(false) - enabled by default
ClassFile cf = cr.read(code);
// Writing
code = new ClassFileWriter().write(cf);

Stripping reserved hotspot instructions from classes

If you encounter a class using reserved hotspot instructions create subclass of ClassFileReader which provides IllegalRewritingInstructionsReader.

An example of this can be found in CrasherPatchingTest.java

Stripping malformed attributes and data from classes

Additional items can be removed via:

// Modifies the 'cf' instance
new IllegalStrippingTransformer(cf).transform();

Extension points exported contracts — how you extend this code

AttributeHolder (Interface)
Applied to a data type that have attributes attached to them. @author Matt Coley [7 implementers]
core/src/main/java/software/coley/cafedude/classfile/behavior/AttributeHolder.java
ClassVisitor (Interface)
Visitor for accepting class members and attributes. @author Justus Garbe [2 implementers]
tree/src/main/java/software/coley/cafedude/tree/visitor/ClassVisitor.java
CpAccessor (Interface)
Applied to a data type that requires access to the constant pool. @author Matt Coley [81 implementers]
core/src/main/java/software/coley/cafedude/classfile/behavior/CpAccessor.java
CodeVisitor (Interface)
Visitor to visit the various instructions of a method. @author Justus Garbe [2 implementers]
tree/src/main/java/software/coley/cafedude/tree/visitor/CodeVisitor.java
CrossCpReferencing (Interface)
Outline of a constant pool entry that references other entries in the constant pool. @author Matt Coley [18 implementers]
core/src/main/java/software/coley/cafedude/classfile/constant/CrossCpReferencing.java
DeclarationVisitor (Interface)
Visitor for visiting generic declaration information. @author Justus Garbe @see MethodVisitor @see FieldVisitor @see Cl [2 …
tree/src/main/java/software/coley/cafedude/tree/visitor/DeclarationVisitor.java
LoadableConstant (Interface)
Outline of a constant pool entry that can be loaded via Opcodes#LDC/Opcodes#LDC_W/Opcodes#LDC2_W [9 implementers]
core/src/main/java/software/coley/cafedude/classfile/constant/LoadableConstant.java
FieldVisitor (Interface)
Visitor for visiting field information. @author Justus Garbe [1 implementers]
tree/src/main/java/software/coley/cafedude/tree/visitor/FieldVisitor.java

Core symbols most depended-on inside this repo

add
called by 142
core/src/main/java/software/coley/cafedude/classfile/ConstPool.java
getText
called by 102
core/src/main/java/software/coley/cafedude/classfile/constant/CpUtf8.java
size
called by 88
core/src/main/java/software/coley/cafedude/classfile/ConstPool.java
get
called by 87
core/src/main/java/software/coley/cafedude/classfile/ConstPool.java
add
called by 82
tree/src/main/java/software/coley/cafedude/tree/visitor/CodeDataVisitor.java
put
called by 64
core/src/main/java/software/coley/cafedude/util/GrowingByteBuffer.java
newUtf8
called by 62
tree/src/main/java/software/coley/cafedude/tree/visitor/writer/Symbols.java
cpAccesses
called by 59
core/src/main/java/software/coley/cafedude/classfile/behavior/CpAccessor.java

Shape

Method 1,431
Class 222
Interface 27
Enum 7

Languages

Java100%

Modules by API surface

core/src/main/java/software/coley/cafedude/classfile/attribute/StackMapTableAttribute.java87 symbols
core/src/main/java/software/coley/cafedude/classfile/attribute/ModuleAttribute.java57 symbols
core/src/main/java/software/coley/cafedude/classfile/annotation/TargetInfo.java53 symbols
core/src/main/java/software/coley/cafedude/io/AttributeReader.java43 symbols
core/src/main/java/software/coley/cafedude/classfile/ConstPool.java42 symbols
tree/src/main/java/software/coley/cafedude/tree/visitor/CodeVisitor.java29 symbols
core/src/main/java/software/coley/cafedude/classfile/attribute/CodeAttribute.java29 symbols
core/src/main/java/software/coley/cafedude/classfile/ClassFile.java28 symbols
tree/src/main/java/software/coley/cafedude/tree/visitor/CodeDataVisitor.java27 symbols
core/src/main/java/software/coley/cafedude/io/ClassBuilder.java23 symbols
core/src/main/java/software/coley/cafedude/classfile/attribute/CharacterRangeTableAttribute.java19 symbols
core/src/main/java/software/coley/cafedude/transform/IllegalStrippingTransformer.java18 symbols

Used by 1 indexed graphs manifest dependencies, hub-wide

For agents

$ claude mcp add CAFED00D \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact