KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > mountainminds > eclemma > internal > core > instr > Instrumentation


1 /*******************************************************************************
2  * Copyright (c) 2006 Mountainminds GmbH & Co. KG
3  * This software is provided under the terms of the Eclipse Public License v1.0
4  * See http://www.eclipse.org/legal/epl-v10.html.
5  *
6  * $Id: Instrumentation.java 39 2006-08-31 20:37:49Z mho $
7  ******************************************************************************/

8 package com.mountainminds.eclemma.internal.core.instr;
9
10 import org.eclipse.core.runtime.IPath;
11
12 import com.mountainminds.eclemma.core.IClassFiles;
13 import com.mountainminds.eclemma.core.IInstrumentation;
14
15 /**
16  * Implementation of {@link IInstrumentation}.
17  *
18  * @author Marc R. Hoffmann
19  * @version $Revision: 39 $
20  */

21 public class Instrumentation implements IInstrumentation {
22
23   private final IClassFiles classfiles;
24   private final boolean inplace;
25   private final IPath outputlocation;
26   private final IPath metadatafile;
27
28   public Instrumentation(IClassFiles classfiles, boolean inplace,
29       IPath outputlocation, IPath metadatafile) {
30     this.classfiles = classfiles;
31     this.inplace = inplace;
32     this.outputlocation = outputlocation;
33     this.metadatafile = metadatafile;
34   }
35
36   public boolean isInplace() {
37     return inplace;
38   }
39
40   public IClassFiles getClassFiles() {
41     return classfiles;
42   }
43
44   public IPath getOutputLocation() {
45     return outputlocation;
46   }
47
48   public IPath getMetaDataFile() {
49     return metadatafile;
50   }
51
52   public boolean equals(Object JavaDoc obj) {
53     if (obj instanceof IInstrumentation) {
54       return metadatafile.equals(((IInstrumentation) obj).getMetaDataFile());
55     } else {
56       return false;
57     }
58   }
59
60   public int hashCode() {
61     return metadatafile.hashCode();
62   }
63
64 }
65
Popular Tags