blob: cdc357226d384d046dae2eaf3bd321cd59f98704 (
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
|
/* *******************************************************************
* Copyright (c) 2005 IBM
* All rights reserved.
* This program and the accompanying materials are made available
* under the terms of the Common Public License v1.0
* which accompanies this distribution and is available at
* http://www.eclipse.org/legal/cpl-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; }
}
|