MCPcopy Create free account
hub / github.com/beanshell/beanshell / visitField

Method visitField

src/bsh/org/objectweb/asm/ClassWriter.java:513–545  ·  view source on GitHub ↗
(
    final int access,
    final String name,
    final String desc,
    final Object value)

Source from the content-addressed store, hash-verified

511 }
512
513 public void visitField (
514 final int access,
515 final String name,
516 final String desc,
517 final Object value)
518 {
519 ++fieldCount;
520 if (fields == null) {
521 fields = new ByteVector();
522 }
523 fields.put2(access).put2(newUTF8(name).index).put2(newUTF8(desc).index);
524 int attributeCount = 0;
525 if (value != null) {
526 ++attributeCount;
527 }
528 if ((access & Constants.ACC_SYNTHETIC) != 0) {
529 ++attributeCount;
530 }
531 if ((access & Constants.ACC_DEPRECATED) != 0) {
532 ++attributeCount;
533 }
534 fields.put2(attributeCount);
535 if (value != null) {
536 fields.put2(newUTF8("ConstantValue").index);
537 fields.put4(2).put2(newCst(value).index);
538 }
539 if ((access & Constants.ACC_SYNTHETIC) != 0) {
540 fields.put2(newUTF8("Synthetic").index).put4(0);
541 }
542 if ((access & Constants.ACC_DEPRECATED) != 0) {
543 fields.put2(newUTF8("Deprecated").index).put4(0);
544 }
545 }
546
547 public CodeVisitor visitMethod (
548 final int access,

Callers

nothing calls this directly

Calls 4

newUTF8Method · 0.95
newCstMethod · 0.95
put2Method · 0.80
put4Method · 0.80

Tested by

no test coverage detected