Package com.github.javaparser
Class Providers
java.lang.Object
com.github.javaparser.Providers
Factory for providers of source code for JavaParser. Providers that have no parameter for encoding but need it will
use UTF-8.
-
Nested Class Summary
-
Field Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic Provider
static Provider
static Provider
provider(InputStream input)
static Provider
provider(InputStream input, Charset encoding)
static Provider
static Provider
static Provider
static Provider
static Provider
resourceProvider(ClassLoader classLoader, String pathToResource, Charset encoding)
Provide a Provider from the resource found in class loader with the provided encoding.
As resource is accessed through a class loader, a leading "/" is not allowed in pathToResourcestatic Provider
resourceProvider(String pathToResource)
Provide a Provider from the resource found in the current class loader with UTF-8 encoding.
As resource is accessed through a class loader, a leading "/" is not allowed in pathToResourcestatic Provider
resourceProvider(String pathToResource, Charset encoding)
Provide a Provider from the resource found in the current class loader with the provided encoding.
As resource is accessed through a class loader, a leading "/" is not allowed in pathToResource
-
Field Details
-
UTF8
-
-
Method Details
-
provider
-
provider
-
provider
-
provider
- Throws:
FileNotFoundException
-
provider
- Throws:
FileNotFoundException
-
provider
- Throws:
IOException
-
provider
- Throws:
IOException
-
provider
-
resourceProvider
public static Provider resourceProvider(ClassLoader classLoader, String pathToResource, Charset encoding) throws IOExceptionProvide a Provider from the resource found in class loader with the provided encoding.
As resource is accessed through a class loader, a leading "/" is not allowed in pathToResource- Throws:
IOException
-
resourceProvider
public static Provider resourceProvider(String pathToResource, Charset encoding) throws IOExceptionProvide a Provider from the resource found in the current class loader with the provided encoding.
As resource is accessed through a class loader, a leading "/" is not allowed in pathToResource- Throws:
IOException
-
resourceProvider
Provide a Provider from the resource found in the current class loader with UTF-8 encoding.
As resource is accessed through a class loader, a leading "/" is not allowed in pathToResource- Throws:
IOException
-