[jboss-jira] [JBoss JIRA] Commented: (JASSIST-92) ExprEditor: edit "throw new Exception"-Statements
Shigeru Chiba (JIRA)
jira-events at lists.jboss.org
Tue Oct 26 10:14:54 EDT 2010
[ https://jira.jboss.org/browse/JASSIST-92?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12559332#action_12559332 ]
Shigeru Chiba commented on JASSIST-92:
--------------------------------------
It may take a bit time to implement it because the code needs some data-flow analysis.
Also, only the static type of the operand of a throw statement is available at compile time.
It might be different from the actual type of that operand (i.e. a thrown Exception object).
> ExprEditor: edit "throw new Exception"-Statements
> -------------------------------------------------
>
> Key: JASSIST-92
> URL: https://jira.jboss.org/browse/JASSIST-92
> Project: Javassist
> Issue Type: Feature Request
> Affects Versions: 3.11.0.GA
> Environment: WIndows Vista Java 1.6
> Reporter: Hans-Joerg Adel
> Assignee: Shigeru Chiba
> Priority: Minor
>
> Hi!
> At the moment I am using the ExprEditor. I miss an edit-Method to access throw statements like the follwing ones:
> throw new RuntimeException();
> try {
> foobar(x);
> } catch (IllegalArgumentException e) {
> doSomething();
> throw e; // this statement
> }
> I think of something like this:
> public void edit(ThrowExpr t) {
> t.getType(); // returns the CtClass of the thrown Exception
> }
> Cheers
> Ruwen and Hans-Joerg
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: https://jira.jboss.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
More information about the jboss-jira
mailing list