Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Jamie Mansfield
asm
Commits
bd4fdc75
Commit
bd4fdc75
authored
Apr 24, 2006
by
ebruneton
Browse files
implemented TODO in visitInnerClassType
[[Split portion of a mixed commit.]]
parent
1df1f2ec
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/org/objectweb/asm/util/TraceSignatureVisitor.java
View file @
bd4fdc75
...
...
@@ -32,6 +32,13 @@ package org.objectweb.asm.util;
import
org.objectweb.asm.Opcodes
;
import
org.objectweb.asm.signature.SignatureVisitor
;
/**
* A {@link SignatureVisitor} that prints a disassembled view of the signature
* it visits.
*
* @author Eugene Kuleshov
* @author Eric Bruneton
*/
public
class
TraceSignatureVisitor
implements
SignatureVisitor
{
private
StringBuffer
declaration
;
...
...
@@ -171,12 +178,10 @@ public class TraceSignatureVisitor implements SignatureVisitor {
case
'F'
:
declaration
.
append
(
"float"
);
break
;
case
'D'
:
// case 'D':
default
:
declaration
.
append
(
"double"
);
break
;
default
:
throw
new
IllegalArgumentException
(
"Invalid descriptor "
+
descriptor
);
}
endType
();
}
...
...
@@ -211,7 +216,11 @@ public class TraceSignatureVisitor implements SignatureVisitor {
}
public
void
visitInnerClassType
(
String
name
)
{
// TODO tests
if
(
argumentStack
%
2
==
1
)
{
declaration
.
append
(
'>'
);
}
argumentStack
/=
2
;
declaration
.
append
(
'.'
);
declaration
.
append
(
separator
).
append
(
name
.
replace
(
'/'
,
'.'
));
separator
=
""
;
argumentStack
*=
2
;
...
...
@@ -220,17 +229,17 @@ public class TraceSignatureVisitor implements SignatureVisitor {
public
void
visitTypeArgument
()
{
if
(
argumentStack
%
2
==
0
)
{
++
argumentStack
;
declaration
.
append
(
"<"
);
declaration
.
append
(
'<'
);
}
else
{
declaration
.
append
(
", "
);
}
declaration
.
append
(
"?"
);
declaration
.
append
(
'?'
);
}
public
SignatureVisitor
visitTypeArgument
(
char
tag
)
{
if
(
argumentStack
%
2
==
0
)
{
++
argumentStack
;
declaration
.
append
(
"<"
);
declaration
.
append
(
'<'
);
}
else
{
declaration
.
append
(
", "
);
}
...
...
@@ -247,7 +256,7 @@ public class TraceSignatureVisitor implements SignatureVisitor {
public
void
visitEnd
()
{
if
(
argumentStack
%
2
==
1
)
{
declaration
.
append
(
">"
);
declaration
.
append
(
'>'
);
}
argumentStack
/=
2
;
endType
();
...
...
@@ -269,7 +278,7 @@ public class TraceSignatureVisitor implements SignatureVisitor {
private
void
endFormals
()
{
if
(
seenFormalParameter
)
{
declaration
.
append
(
">"
);
declaration
.
append
(
'>'
);
seenFormalParameter
=
false
;
}
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment