blob: 27779c48334ce064e48eb1da22afbeff919cd1c8 (
plain) (
blame)
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
46
47
48
49
|
/*******************************************************************************
* Copyright (c) 2007, 2008 BEA Systems, Inc. and others
* 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:
* wharley@bea.com - initial API and implementation
*
*******************************************************************************/
package org.eclipse.jdt.internal.apt.pluggable.core.filer;
import java.io.IOException;
import java.io.InputStream;
import java.io.Reader;
import javax.tools.FileObject;
public abstract class IdeOutputFileObject implements FileObject {
@Override
public boolean delete() {
throw new IllegalStateException("Deleting a file is not permitted from within an annotation processor");
}
@Override
public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
throw new IllegalStateException("Generated files are write-only");
}
@Override
public long getLastModified() {
//TODO
throw new UnsupportedOperationException("Not yet implemented");
}
@Override
public InputStream openInputStream() throws IOException {
throw new IllegalStateException("Opening an input stream on a generated file is not permitted");
}
@Override
public Reader openReader(boolean ignoreEncodingErrors) throws IOException {
throw new IllegalStateException("Opening a reader on a generated file is not permitted");
}
}
|