Class Parser
java.lang.Object
org.glassfish.hk2.classmodel.reflect.Parser
- All Implemented Interfaces:
Closeable, AutoCloseable
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ParsingContextprivate final intstatic final Stringprivate final ExecutorServiceprivate final Stack<Future<Parser.Result>> private final ReadWriteLockprivate final boolean -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionawaitTermination(int timeOut, TimeUnit unit) voidclose()private ArchiveAdaptercreateArchiveAdapter(File source, Runnable doneHook) private ExecutorServiceprivate voiddoJob(ArchiveAdapter adapter, Runnable doneHook) Returns the context this parser instance was initialized with during the call toParser(ParsingContext)private static URIgetDefiningURI(File file) private static FilegetFilePath(String path, String resourceName) private Typesvoidparse(ArchiveAdapter source, Runnable doneHook) Parse the archive adapter entries and run the runnable hook on completion.private voidsaveResult(URI uri, Types types)
-
Field Details
-
DEFAULT_WAIT_SYSPROP
- See Also:
-
context
-
processedURI
-
futures
-
executorService
-
ownES
private final boolean ownES -
lock
-
DEFAULT_TIMEOUT
private final int DEFAULT_TIMEOUT
-
-
Constructor Details
-
Parser
-
-
Method Details
-
awaitTermination
- Throws:
InterruptedException
-
awaitTermination
- Throws:
InterruptedException
-
getDefiningURI
-
getFilePath
-
close
public void close()- Specified by:
closein interfaceAutoCloseable- Specified by:
closein interfaceCloseable
-
parse
- Throws:
IOException
-
createArchiveAdapter
- Throws:
IOException
-
parse
Parse the archive adapter entries and run the runnable hook on completion.- Parameters:
source- the archive adapter to parsedoneHook- the runnable hook to run after completion- Returns:
- the future object to monitor the result of the parsing.
- Throws:
IOException- thrown by the source archive adapter when accessing entries
-
getResult
-
saveResult
-
doJob
- Throws:
Exception
-
getContext
Returns the context this parser instance was initialized with during the call toParser(ParsingContext)- Returns:
- the parsing context this parser uses to store the parsing activities results.
-
createExecutorService
-