public final class FileDescriptorSource extends Object
SerializationContext.registerProtoFiles(FileDescriptorSource)
.Modifier and Type | Class and Description |
---|---|
static interface |
FileDescriptorSource.ProgressCallback
A callback interface that receives status notifications during the processing of files defined by a
FileDescriptorSource . |
Constructor and Description |
---|
FileDescriptorSource() |
Modifier and Type | Method and Description |
---|---|
FileDescriptorSource |
addProtoFile(String name,
File protofile) |
FileDescriptorSource |
addProtoFile(String name,
InputStream contents) |
FileDescriptorSource |
addProtoFile(String name,
Reader contents) |
FileDescriptorSource |
addProtoFile(String name,
String contents) |
FileDescriptorSource |
addProtoFiles(ClassLoader userClassLoader,
String... classpathResources) |
FileDescriptorSource |
addProtoFiles(String... classpathResources) |
static FileDescriptorSource |
fromResources(ClassLoader userClassLoader,
String... classPathResources) |
static FileDescriptorSource |
fromResources(String... classPathResources) |
static FileDescriptorSource |
fromString(String name,
String protoSource) |
Map<String,char[]> |
getFileDescriptors() |
FileDescriptorSource.ProgressCallback |
getProgressCallback() |
FileDescriptorSource |
withProgressCallback(FileDescriptorSource.ProgressCallback progressCallback)
Set the ProgressCallback.
|
public FileDescriptorSource withProgressCallback(FileDescriptorSource.ProgressCallback progressCallback)
null
callback indicates that errors are to be reported immediately and the
operation should be aborted on first error.progressCallback
- the callback, can be null
public FileDescriptorSource addProtoFiles(String... classpathResources) throws IOException
IOException
public FileDescriptorSource addProtoFiles(ClassLoader userClassLoader, String... classpathResources) throws IOException
IOException
public FileDescriptorSource addProtoFile(String name, String contents)
public FileDescriptorSource addProtoFile(String name, InputStream contents) throws IOException
IOException
public FileDescriptorSource addProtoFile(String name, Reader contents) throws IOException
IOException
public FileDescriptorSource addProtoFile(String name, File protofile) throws IOException
IOException
public static FileDescriptorSource fromResources(ClassLoader userClassLoader, String... classPathResources) throws IOException
IOException
public static FileDescriptorSource fromResources(String... classPathResources) throws IOException
IOException
public static FileDescriptorSource fromString(String name, String protoSource)
public FileDescriptorSource.ProgressCallback getProgressCallback()
Copyright © 2020 JBoss, a division of Red Hat. All rights reserved.