Skip to content

Commit 9611e3c

Browse files
committed
Add toString to field/method model types
1 parent d6dfbab commit 9611e3c

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

core/src/main/java/software/coley/cafedude/classfile/Field.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,4 +32,9 @@ public Field(@Nonnull List<Attribute> attributes, int access, @Nonnull CpUtf8 na
3232
public AttributeContext getHolderType() {
3333
return AttributeContext.FIELD;
3434
}
35+
36+
@Override
37+
public String toString() {
38+
return getName().getText() + " " + getType().getText();
39+
}
3540
}

core/src/main/java/software/coley/cafedude/classfile/Method.java

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,4 +57,9 @@ public Set<CpEntry> cpAccesses() {
5757
}
5858
return set;
5959
}
60+
61+
@Override
62+
public String toString() {
63+
return getName().getText() + getType().getText();
64+
}
6065
}

0 commit comments

Comments
 (0)