Package gw.fs.jar
Class JarEntryResourceImpl
- java.lang.Object
-
- gw.fs.jar.JarEntryResourceImpl
-
- All Implemented Interfaces:
IResource
- Direct Known Subclasses:
JarEntryDirectoryImpl
,JarEntryFileImpl
public abstract class JarEntryResourceImpl extends Object implements IResource
-
-
Field Summary
Fields Modifier and Type Field Description protected JarEntry
_entry
protected JarFileDirectoryImpl
_jarFile
protected String
_name
protected IJarFileDirectory
_parent
-
Constructor Summary
Constructors Modifier Constructor Description protected
JarEntryResourceImpl(String name, IJarFileDirectory parent, JarFileDirectoryImpl jarFile)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
create()
boolean
delete()
boolean
equals(Object obj)
boolean
exists()
Indicates whether this resource exists.String
getName()
Gets this file's or directory's name.IDirectory
getParent()
Gets this file's our directory's parent directory.ResourcePath
getPath()
boolean
isChildOf(IDirectory dir)
Indicates whether this resource is a direct child of the given directory.boolean
isDescendantOf(IDirectory dir)
Indicates whether this resource is a descendant of the given directory.boolean
isInJar()
boolean
isJavaFile()
void
setEntry(JarEntry entry)
protected void
setExists()
File
toJavaFile()
String
toString()
URI
toURI()
-
-
-
Field Detail
-
_entry
protected JarEntry _entry
-
_parent
protected IJarFileDirectory _parent
-
_jarFile
protected JarFileDirectoryImpl _jarFile
-
_name
protected String _name
-
-
Constructor Detail
-
JarEntryResourceImpl
protected JarEntryResourceImpl(String name, IJarFileDirectory parent, JarFileDirectoryImpl jarFile)
-
-
Method Detail
-
setEntry
public void setEntry(JarEntry entry)
-
setExists
protected void setExists()
-
getParent
public IDirectory getParent()
Description copied from interface:IResource
Gets this file's our directory's parent directory.
-
getName
public String getName()
Description copied from interface:IResource
Gets this file's or directory's name.
-
exists
public boolean exists()
Description copied from interface:IResource
Indicates whether this resource exists.
-
delete
public boolean delete() throws IOException
- Specified by:
delete
in interfaceIResource
- Throws:
IOException
-
getPath
public ResourcePath getPath()
-
isChildOf
public boolean isChildOf(IDirectory dir)
Description copied from interface:IResource
Indicates whether this resource is a direct child of the given directory.
-
isDescendantOf
public boolean isDescendantOf(IDirectory dir)
Description copied from interface:IResource
Indicates whether this resource is a descendant of the given directory.- Specified by:
isDescendantOf
in interfaceIResource
- Parameters:
dir
- the directory which would be the ancestor- Returns:
- true if this is a descendant of the given directory
-
toJavaFile
public File toJavaFile()
- Specified by:
toJavaFile
in interfaceIResource
-
isJavaFile
public boolean isJavaFile()
- Specified by:
isJavaFile
in interfaceIResource
-
-