Class DefaultProtoLoader
java.lang.Object
io.protostuff.parser.DefaultProtoLoader
- All Implemented Interfaces:
Proto.Loader
- Direct Known Subclasses:
CachingProtoLoader
Default proto loader for imported protos.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected static final intstatic final DefaultProtoLoaderstatic final intThe default proto search strategy to use.static final StringStandard JVM property.private static final Stringstatic final Stringprotected static final intprotected static final intprotected final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static FilegetBaseDirFromPackagePath(String path, Proto importer) static DefaultProtoLoaderstatic URLgetResource(String resource, Class<?> context) Loads aURLresource from the classloader; If not found, the classloader of thecontextclass specified will be used.static URLgetResource(String resource, Class<?> context, boolean checkParent) Loads aURLresource from the classloader; If not found, the classloader of thecontextclass specified will be used.protected Protoprotected Protostatic ProtoloadFromClasspath(String path, Proto importer) Loads a proto from the classpath.protected ProtoloadFromOtherResource(String path, Proto importer) protected ProtosearchFromAll(String path, Proto importer) Search from every possible resource.protected ProtosearchFromProtoPathAndClasspath(String path, Proto importer) Search from proto_path and classpath (in that order).protected ProtosearchFromProtoPathOnly(String path, Proto importer) Search from proto_path only.
-
Field Details
-
ALL
protected static final int ALL- See Also:
-
PROTO_PATH_ONLY
protected static final int PROTO_PATH_ONLY- See Also:
-
PROTO_PATH_AND_CLASSPATH
protected static final int PROTO_PATH_AND_CLASSPATH- See Also:
-
DEFAULT_PROTO_SEARCH_STRATEGY
public static final int DEFAULT_PROTO_SEARCH_STRATEGYThe default proto search strategy to use. -
PATH_SEPARATOR
Standard JVM property. See https://docs.oracle.com/javase/tutorial/essential/environment/sysprop.html -
PATH_SEPARATOR_PROPERTY
- See Also:
-
PATH_SEPARATOR_DEFAULT
- See Also:
-
DEFAULT_INSTANCE
-
__protoLoadDirs
-
protoSearchStrategy
protected final int protoSearchStrategy
-
-
Constructor Details
-
DefaultProtoLoader
public DefaultProtoLoader() -
DefaultProtoLoader
public DefaultProtoLoader(int protoSearchStrategy)
-
-
Method Details
-
getDefaultInstance
-
load
-
searchFromProtoPathOnly
-
searchFromProtoPathAndClasspath
-
searchFromAll
-
getBaseDirFromPackagePath
-
loadFromOtherResource
-
loadFrom
-
loadFrom
-
loadFromClasspath
-
getResource
-
getResource
-