Class PlainJavaContainer
- java.lang.Object
-
- org.faktorips.devtools.abstraction.AWrapper<java.io.File>
-
- org.faktorips.devtools.abstraction.plainjava.internal.PlainJavaResource
-
- org.faktorips.devtools.abstraction.plainjava.internal.PlainJavaContainer
-
- All Implemented Interfaces:
java.lang.Comparable<AResource>,java.lang.Iterable<AResource>,AAbstraction,AContainer,AResource
- Direct Known Subclasses:
PlainJavaFolder
public abstract class PlainJavaContainer extends PlainJavaResource implements AContainer
-
-
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 PlainJavaContainer(java.io.File directory)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AResourcefindMember(java.lang.String path)Returns the member of this container (or one of its members) denoted by the given path (interpreted as relative to this resource), if it exists.AFilegetFile(java.nio.file.Path path)Returns the file that is a member of this container (or one of its members) denoted by the given path (interpreted as relative to this resource).AFoldergetFolder(java.nio.file.Path path)Returns the folder that is a member of this container (or one of its members) denoted by the given path (interpreted as relative to this resource).java.util.SortedSet<PlainJavaResource>getMembers()Returns this container's members, sorted by their name.protected booleanisSynchronizedInternal()protected voidrecursive(java.util.function.Consumer<PlainJavaResource> consumer, AResource.AResourceTreeTraversalDepth depth)Executes the givenConsumerfor this resource and, according to the given depth, its children.protected voidrefreshInternal()-
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, move, recursive, 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.AContainer
iterator
-
Methods inherited from interface org.faktorips.devtools.abstraction.AResource
compareTo, copy, createMarker, delete, deleteMarkers, exists, findMarkers, getLocalTimeStamp, getLocation, getModificationStamp, getName, getParent, getProject, getProjectRelativePath, getType, getWorkspace, getWorkspaceRelativePath, isAccessible, isDerived, isSynchronized, move, refreshLocal, setDerived, touch
-
-
-
-
Method Detail
-
getMembers
public java.util.SortedSet<PlainJavaResource> getMembers()
Description copied from interface:AContainerReturns this container's members, sorted by their name.- Specified by:
getMembersin interfaceAContainer- Returns:
- this container's members
-
findMember
public AResource findMember(java.lang.String path)
Description copied from interface:AContainerReturns the member of this container (or one of its members) denoted by the given path (interpreted as relative to this resource), if it exists.- Specified by:
findMemberin interfaceAContainer- Parameters:
path- a path, relative to this container- Returns:
- the member identified by the path or
nullif no such member exists
-
getFile
public AFile getFile(java.nio.file.Path path)
Description copied from interface:AContainerReturns the file that is a member of this container (or one of its members) denoted by the given path (interpreted as relative to this resource). It may notexist.- Specified by:
getFilein interfaceAContainer- Parameters:
path- a path, relative to this container- Returns:
- the file identified by the path
-
getFolder
public AFolder getFolder(java.nio.file.Path path)
Description copied from interface:AContainerReturns the folder that is a member of this container (or one of its members) denoted by the given path (interpreted as relative to this resource). It may notexist.- Specified by:
getFolderin interfaceAContainer- Parameters:
path- a path, relative to this container- Returns:
- the folder identified by the path
-
refreshInternal
protected void refreshInternal()
- Overrides:
refreshInternalin classPlainJavaResource
-
isSynchronizedInternal
protected boolean isSynchronizedInternal()
- Overrides:
isSynchronizedInternalin classPlainJavaResource
-
recursive
protected void recursive(java.util.function.Consumer<PlainJavaResource> consumer, AResource.AResourceTreeTraversalDepth depth)
Description copied from class:PlainJavaResourceExecutes the givenConsumerfor this resource and, according to the given depth, its children.- Overrides:
recursivein classPlainJavaResourcedepth- is ignored if this resource is notAContainer.
-
-