Skip to content
This repository has been archived by the owner on May 25, 2022. It is now read-only.

Commit

Permalink
feat(bytecode): add modifier support
Browse files Browse the repository at this point in the history
  • Loading branch information
phodal committed Mar 28, 2022
1 parent bdd75e4 commit 7bd03bc
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
Expand Up @@ -116,9 +116,12 @@ class ByteCodeParser {
}

private fun createField(field: FieldNode): CodeField {
val isInterface = CodeConstants.ACC_INTERFACE == field.access

return CodeField(
TypeType = Type.getType(field.desc).className,
TypeValue = field.name
TypeValue = field.name,
Modifiers = createModifiers(field.access, FIELD_ALLOWED, isInterface, FIELD_EXCLUDED)
)
}

Expand Down
Expand Up @@ -85,5 +85,6 @@ internal class ByteCodeParserTest {
assertEquals(1, ds.Fields.size)
assertEquals("hello", ds.Fields[0].TypeValue)
assertEquals("com.example.demo.Hello", ds.Fields[0].TypeType)
assertEquals("private", ds.Fields[0].Modifiers[0])
}
}

0 comments on commit 7bd03bc

Please sign in to comment.