1   /***************************************************************************************
2    * Copyright (c) Jonas BonŽr, Alexandre Vasseur. All rights reserved.                 *
3    * http://aspectwerkz.codehaus.org                                                    *
4    * ---------------------------------------------------------------------------------- *
5    * The software in this package is published under the terms of the LGPL license      *
6    * a copy of which has been included with this distribution in the license.txt file.  *
7    **************************************************************************************/
8   package test.withincode;
9   
10  import test.handler.HandlerTestBeforeException;
11  
12  
13  /***
14   * Target for test with withincode(staticinitialization)
15   * 
16   * @author <a href="mailto:the_mindstorm@evolva.ro">Alex Popescu</a>
17   * 
18   * @WithincodeClinit
19   */
20  public class Target {
21      private static CtorCallTarget s_field;
22      
23  	static {
24  	    s_field = new CtorCallTarget(); // SET && CALL(CTOR)
25  	    
26  	    if(null != s_field) {	// GET
27  	        ;
28  	    }
29  	    
30  	    try {
31  	    	staticMethod();
32  	    } catch(HandlerTestBeforeException htbe) {
33  	        ;
34  	    }
35  	}
36  	
37  	public static final void staticMethod() throws HandlerTestBeforeException {
38  	    throw new HandlerTestBeforeException();
39  	}
40  	
41  	private static class CtorCallTarget {
42  	    public CtorCallTarget() {
43  	    }
44  	}
45  	
46  	public static interface IWithincodeClinitAnnotation {
47  		String value();
48  	}
49  }