Class PlainJavaFile
- java.lang.Object
-
- org.faktorips.devtools.abstraction.AWrapper<java.io.File>
-
- org.faktorips.devtools.abstraction.plainjava.internal.PlainJavaResource
-
- org.faktorips.devtools.abstraction.plainjava.internal.PlainJavaFile
-
- All Implemented Interfaces:
java.lang.Comparable<AResource>,AAbstraction,AFile,AResource
public class PlainJavaFile extends PlainJavaResource implements AFile
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.faktorips.devtools.abstraction.AResource
AResource.AResourceTreeTraversalDepth, AResource.AResourceType
-
-
Field Summary
-
Fields inherited from interface org.faktorips.devtools.abstraction.AResource
COMPARING_BY_NAME
-
-
Constructor Summary
Constructors Constructor Description PlainJavaFile(java.io.File file)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidcreate(java.io.InputStream source, org.eclipse.core.runtime.IProgressMonitor monitor)Creates this file in the file-system with data from the givenInputStream.java.io.InputStreamgetContents()Returns the file's data contents as anInputStream.java.lang.StringgetExtension()Returns the corresponding file's extension (the part after the last '.'), if there is any.AResource.AResourceTypegetType()A resource type can be used instead of checking forinstanceofwith concrete implementations.booleanisReadOnly()Returns whether this file is read-only (meaning data can be read but not written).voidsetContents(java.io.InputStream source, boolean keepHistory, org.eclipse.core.runtime.IProgressMonitor monitor)Overwrites this file in the file-system with data from the givenInputStream.-
Methods inherited from class org.faktorips.devtools.abstraction.plainjava.internal.PlainJavaResource
copy, createMarker, delete, deleteMarker, deleteMarkers, exists, findMarkers, getLocalTimeStamp, getLocation, getModificationStamp, getName, getParent, getProject, getProjectRelativePath, getWorkspace, getWorkspaceRelativePath, isAccessible, isDerived, isSynchronized, isSynchronizedInternal, move, recursive, recursive, refreshInternal, refreshLocal, setDerived, touch
-
Methods inherited from class org.faktorips.devtools.abstraction.AWrapper
equals, hashCode, toString, unwrap
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.faktorips.devtools.abstraction.AAbstraction
unwrap
-
Methods inherited from interface org.faktorips.devtools.abstraction.AResource
compareTo, copy, createMarker, delete, deleteMarkers, exists, findMarkers, getLocalTimeStamp, getLocation, getModificationStamp, getName, getParent, getProject, getProjectRelativePath, getWorkspace, getWorkspaceRelativePath, isAccessible, isDerived, isSynchronized, move, refreshLocal, setDerived, touch
-
-
-
-
Method Detail
-
getType
public AResource.AResourceType getType()
Description copied from interface:AResourceA resource type can be used instead of checking forinstanceofwith concrete implementations.
-
create
public void create(java.io.InputStream source, org.eclipse.core.runtime.IProgressMonitor monitor)Description copied from interface:AFileCreates this file in the file-system with data from the givenInputStream.
-
getContents
public java.io.InputStream getContents()
Description copied from interface:AFileReturns the file's data contents as anInputStream.- Specified by:
getContentsin interfaceAFile- Returns:
- the file's contents
-
setContents
public void setContents(java.io.InputStream source, boolean keepHistory, org.eclipse.core.runtime.IProgressMonitor monitor)Description copied from interface:AFileOverwrites this file in the file-system with data from the givenInputStream.- Specified by:
setContentsin interfaceAFile- Parameters:
source- provides the data to be written to the new filekeepHistory- whether to keep a history of the content (if supported by the workspace)monitor- a progress monitor that is notified about this process. The monitor may benullwhen progress does not need to be reported.
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:AFileReturns whether this file is read-only (meaning data can be read but not written).- Specified by:
isReadOnlyin interfaceAFile- Returns:
- whether this file is read-only
-
getExtension
public java.lang.String getExtension()
Description copied from interface:AFileReturns the corresponding file's extension (the part after the last '.'), if there is any.- Specified by:
getExtensionin interfaceAFile- Returns:
- this file's extension or an empty String if the file has no extension
-
-