blob: 160d7018b975c90c000717cf703364204d5635e6 (
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
45
|
/* *******************************************************************
* Copyright (c) 2005 IBM
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Eclipse Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Andy Clement initial implementation
* ******************************************************************/
package org.aspectj.weaver;
import java.io.DataInputStream;
import java.io.InputStream;
import org.aspectj.weaver.AjAttribute.WeaverVersionInfo;
/**
* Lightweight subclass of DataInputStream that knows what version of the weaver was used to construct the data in it.
*/
public class VersionedDataInputStream extends DataInputStream {
private WeaverVersionInfo version = new WeaverVersionInfo();// assume we are the latest unless something tells us otherwise...
public VersionedDataInputStream(InputStream is) {
super(is);
}
public int getMajorVersion() {
return version.getMajorVersion();
}
public int getMinorVersion() {
return version.getMinorVersion();
}
public long getBuildstamp() {
return version.getBuildstamp();
}
public void setVersion(WeaverVersionInfo version) {
this.version = version;
}
}
|