Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.modeshape.sequencer.javafile
Class JavaMetadataUtil

    java.lang.Object
      org.modeshape.sequencer.javafile.JavaMetadataUtil

    public class JavaMetadataUtil

extends Object

Utility class for working with metadata.

Method Summary
`static String` | `expressionString(org.eclipse.jdt.core.dom.Expression expression)`
`static char[]` | `getJavaSourceFromTheInputStream(InputStream inputStream, long length, String encoding)` Gets Java source from the `InputStream`.
`static String` | `getName(org.eclipse.jdt.core.dom.Name name)` Get the fully qualified name from the `Name`.
`static long` | `length(InputStream stream)` Get the length of the input stream.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### length

    public static long length(InputStream stream)
                       throws IOException

  Get the length of the input stream.

  Parameters:
    `stream` - - the `InputStream`
  Returns:
    the length of the stream.
  Throws:
    `IOException` - - exceptional situation during calculating the length.

### getJavaSourceFromTheInputStream

    public static char[] getJavaSourceFromTheInputStream(InputStream inputStream,
                                                         long length,
                                                         String encoding)
                                                  throws IOException

  Gets Java source from the `InputStream`.

  Parameters:
    `inputStream` - - the `FileInputStream`.
    `length` - - the length of the java file.
    `encoding` - - the encoding of the source, if there is one.
  Returns:
    the array character of the java source.
  Throws:
    `IOException` - - exceptional error can be thrown during the reading of the file.

### getName

    public static String getName(org.eclipse.jdt.core.dom.Name name)

  Get the fully qualified name from the `Name`.

  Parameters:
    `name` - - the name to process.
  Returns:
    a FQN of the name.

### expressionString

    public static String expressionString(org.eclipse.jdt.core.dom.Expression expression)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
| ModeShape Distribution 3.0.0.Alpha6
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2008-2012 JBoss, a division of Red Hat. All Rights Reserved.