78 */
79 private boolean hasFormals;
80
81 /**
82 * Indicates if the signature contains method parameter types.
83 */
84 private boolean hasParameters;
85
86 /**
87 * Stack used to keep track of class types that have arguments. Each element
88 * of this stack is a boolean encoded in one bit. The top of the stack is
89 * the lowest order bit. Pushing false = *2, pushing true = *2+1, popping =
90 * /2.
91 */
92 private int argumentStack;
93
94 /**
95 * Constructs a new {@link SignatureWriter} object.
96 */
97 public SignatureWriter() {
98 super(Opcodes.ASM5);
99 }
100
101 // ------------------------------------------------------------------------
102 // Implementation of the SignatureVisitor interface
103 // ------------------------------------------------------------------------
104
105 @Override
106 public void visitFormalTypeParameter(final String name) {
107 if (!hasFormals) {
108 hasFormals = true;
109 buf.append('<');
110 }
111 buf.append(name);
112 buf.append(':');
113 }
114
115 @Override
116 public SignatureVisitor visitClassBound() {
117 return this;
118 }
|
78 */
79 private boolean hasFormals;
80
81 /**
82 * Indicates if the signature contains method parameter types.
83 */
84 private boolean hasParameters;
85
86 /**
87 * Stack used to keep track of class types that have arguments. Each element
88 * of this stack is a boolean encoded in one bit. The top of the stack is
89 * the lowest order bit. Pushing false = *2, pushing true = *2+1, popping =
90 * /2.
91 */
92 private int argumentStack;
93
94 /**
95 * Constructs a new {@link SignatureWriter} object.
96 */
97 public SignatureWriter() {
98 super(Opcodes.ASM6);
99 }
100
101 // ------------------------------------------------------------------------
102 // Implementation of the SignatureVisitor interface
103 // ------------------------------------------------------------------------
104
105 @Override
106 public void visitFormalTypeParameter(final String name) {
107 if (!hasFormals) {
108 hasFormals = true;
109 buf.append('<');
110 }
111 buf.append(name);
112 buf.append(':');
113 }
114
115 @Override
116 public SignatureVisitor visitClassBound() {
117 return this;
118 }
|