Package com.github.javaparser
Class Providers
- java.lang.Object
-
- com.github.javaparser.Providers
-
public final class Providers extends Object
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 Modifier and Type Class Description static interfaceProviders.PreProcessor
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Providerprovider(File file)static Providerprovider(File file, Charset encoding)static Providerprovider(InputStream input)static Providerprovider(InputStream input, Charset encoding)static Providerprovider(Reader reader)static Providerprovider(String source)static Providerprovider(Path path)static Providerprovider(Path path, Charset encoding)static 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 Detail
-
UTF8
public static final Charset UTF8
-
-
Method Detail
-
provider
public static Provider provider(InputStream input, Charset encoding)
-
provider
public static Provider provider(InputStream input)
-
provider
public static Provider provider(File file, Charset encoding) throws FileNotFoundException
- Throws:
FileNotFoundException
-
provider
public static Provider provider(File file) throws FileNotFoundException
- Throws:
FileNotFoundException
-
provider
public static Provider provider(Path path, Charset encoding) throws IOException
- Throws:
IOException
-
provider
public static Provider provider(Path path) throws IOException
- Throws:
IOException
-
resourceProvider
public static Provider resourceProvider(ClassLoader classLoader, String pathToResource, Charset encoding) throws IOException
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 pathToResource- Throws:
IOException
-
resourceProvider
public static Provider resourceProvider(String pathToResource, Charset encoding) throws IOException
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- Throws:
IOException
-
resourceProvider
public static Provider resourceProvider(String pathToResource) throws IOException
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
-
-