public final class Roaster extends Object
JavaType instances.| Modifier and Type | Method and Description |
|---|---|
static <T extends JavaSource<?>> |
create(Class<T> type)
Create a new empty
JavaSource instance. |
static String |
format(Properties properties,
String source)
Format the given
String as a Java source type, using the given code format Properties |
static String |
format(String source)
Format the given
String as a Java source file, using the built in code format style. |
static JavaType<?> |
parse(char[] data)
Parse the given character array into a new
JavaType instance. |
static <T extends JavaType<?>> |
parse(Class<T> type,
char[] data)
Read the given character array and parse its data into a new
JavaType instance of the given type. |
static <T extends JavaType<?>> |
parse(Class<T> type,
File file)
|
static <T extends JavaType<?>> |
parse(Class<T> type,
InputStream data)
Read the given
InputStream and parse its data into a new JavaType instance of the given type. |
static <T extends JavaType<?>> |
parse(Class<T> type,
String data)
Read the given string and parse its data into a new
JavaType instance of the given type. |
static <T extends JavaType<?>> |
parse(Class<T> type,
URL url)
|
static JavaType<?> |
parse(File file)
|
static JavaType<?> |
parse(InputStream data)
Read the given
InputStream and parse the data into a new JavaType instance. |
static JavaType<?> |
parse(String data)
Parse the given String data into a new
JavaType instance. |
static JavaType<?> |
parse(URL data)
|
static JavaUnit |
parseUnit(InputStream data)
Read the given
InputStream and parse its data into a new JavaUnit instance of the given type. |
static JavaUnit |
parseUnit(String data)
|
public static <T extends JavaSource<?>> T create(Class<T> type)
JavaSource instance.public static JavaType<?> parse(File file) throws FileNotFoundException
FileNotFoundExceptionpublic static JavaType<?> parse(URL data) throws IOException
IOExceptionpublic static JavaType<?> parse(InputStream data)
InputStream and parse the data into a new JavaType instance.public static JavaType<?> parse(char[] data)
JavaType instance.public static JavaType<?> parse(String data)
JavaType instance.public static <T extends JavaType<?>> T parse(Class<T> type, URL url) throws IOException
FileNotFoundExceptionIOExceptionpublic static <T extends JavaType<?>> T parse(Class<T> type, File file) throws FileNotFoundException
FileNotFoundExceptionpublic static <T extends JavaType<?>> T parse(Class<T> type, char[] data)
JavaType instance of the given type.public static <T extends JavaType<?>> T parse(Class<T> type, String data)
JavaType instance of the given type.public static <T extends JavaType<?>> T parse(Class<T> type, InputStream data)
InputStream and parse its data into a new JavaType instance of the given type. The
caller is responsible for closing the stream.public static JavaUnit parseUnit(InputStream data)
InputStream and parse its data into a new JavaUnit instance of the given type. The
caller is responsible for closing the stream.public static String format(String source)
String as a Java source file, using the built in code format style.source - a java source codepublic static String format(Properties properties, String source)
String as a Java source type, using the given code format PropertiesCopyright © 2016 JBoss by Red Hat. All rights reserved.