public interface JavaParser
| Modifier and Type | Method and Description |
|---|---|
<T extends JavaSource<?>> |
create(Class<T> type)
Create a new empty
JavaSource instance. |
JavaType<?> |
parse(InputStream data)
Deprecated.
parseUnit(InputStream) should be used instead, as the JLS allows several types to be defined
in a single file |
JavaUnit |
parseUnit(InputStream data)
Read the given
InputStream and parse the data into a new JavaUnit instance. |
<T extends JavaSource<?>> T create(Class<T> type)
JavaSource instance.type - desired source typeT, null if the JavaSource type is not supported by this
JavaParser.JavaUnit parseUnit(InputStream data)
InputStream and parse the data into a new JavaUnit instance.data - to parseJavaUnit, null if the data format is not recognized by this JavaParser.@Deprecated JavaType<?> parse(InputStream data)
parseUnit(InputStream) should be used instead, as the JLS allows several types to be defined
in a single fileInputStream and parse the data into a new JavaType instance.data - to parseJavaType, null if the data format is not recognized by this JavaParser.Copyright © 2015 JBoss by Red Hat. All rights reserved.