aboutsummaryrefslogtreecommitdiffstats
path: root/tests/ajdoc/input/applesAspectJ/TransportAspect.java
blob: 1e9ac2edafa50e88aca76143a52ccda1d3b76332 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/**
 * This aspect crosscuts the process of shipping apples.
 * 
 * @author	Mik Kersten
 * @version	$Version$
 */

public class TransportAspect
{
    private introduction AppleCrate 
        {  
            
            /** 
            * Represents the name of the given crate.  Initialized to be 
            * a placeholder.
            */
            private String crateName = "temp crate";
            
            /**
            * Bruises each apple in the crate according to the bruise facor.  The bruise
            * factor is an integer that is passed as a parameter.
            */
            private void bruiser( int bruiseFactor )
            {
                for ( int i = 0; i < crateContents.length; i++ )
                {
                    crateContents[i].bruise( bruiseFactor );
                }
            }
        }
    
  /**
   * Crosscut <CODE>Apple</CODE> serialization methods.  This can be used for bruising 
   * apples and doing other silly things when the apples are being packed.
   */
  crosscut packCrosscut(): Apple && void writeObject( java.io.ObjectOutputStream out );

  /**
   * Crosscut <CODE>Apple</CODE> de-serialization methods.  This can be used for doing
   * silly things.  It is to be used when the apples are unpacked.
   */
  crosscut unpackCrosscut(): Apple && void readObject( java.io.ObjectInputStream in );
}