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
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic Providerstatic Providerstatic Providerprovider(InputStream input)static Providerprovider(InputStream input, Charset encoding)static Providerstatic Providerstatic Providerstatic Providerstatic ProviderresourceProvider(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 ProviderresourceProvider(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 ProviderresourceProvider(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
-