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

## org.modeshape.sequencer.java.metadata
Class JavaMetadata

    java.lang.Object
      org.modeshape.sequencer.java.AbstractJavaMetadata
          org.modeshape.sequencer.java.metadata.JavaMetadata

    public class JavaMetadata

extends AbstractJavaMetadata

Metadata for a Java source file.

Method Summary
`List<ImportMetadata>` | `getImports()` Gets a list of from the unit.
`PackageMetadata` | `getPackageMetadata()` Gets the `PackageMetadata` from the unit.
`List<TypeMetadata>` | `getTypeMetadata()` Gets the list for type declarations (class/interface/enum/annotation) of this unit.
`static JavaMetadata` | `instance(InputStream inputStream, long length, String encoding)` Creates a new instance of `JavaMetadata`, that will be used to get informations of a compilation unit.

Methods inherited from class org.modeshape.sequencer.java.AbstractJavaMetadata
`createAnnotationMetadataFor, createImportMetadata, createPackageMetadata, createParameterizedFieldMetadataFrom, createTypeMetadata, getConstructorMetadataFrom, getFieldMetadataFrom, getFieldName, getMethodMetadataFrom, getMethodTypeMemberMetadataFrom, processArrayTypeFrom, processModifiersOfFieldDeclaration, processModifiersOfMethodDeclaration, processModifiersOfTypDeclaration, processParameterizedType, processParametersOfMethodDeclaration, processPrimitiveType, processReturnTypeOfMethodDeclaration, processSimpleType, processVariablesOfVariableDeclarationFragment`

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

Method Detail

### instance

    public static JavaMetadata instance(InputStream inputStream,
                                        long length,
                                        String encoding)

  Creates a new instance of `JavaMetadata`, that will be used to get informations of a compilation unit.

  Parameters:
    `inputStream` - - the `InputStream` in our case a `FileInputStream` of the java file.
    `length` - - the length of the java file.
    `encoding` - - the encoding that can be used.
  Returns:
    the new instace of `JavaMetadata`
  See Also:
    `File.length()`

### getPackageMetadata

    public final PackageMetadata getPackageMetadata()

  Gets the `PackageMetadata` from the unit.

  Returns:
    the PackageMetadata or null if there is not package declaration for the unit.

### getImports

    public List<ImportMetadata> getImports()

  Gets a list of from the unit.

  Returns:
    all imports of this unit if there is one.

### getTypeMetadata

    public List<TypeMetadata> getTypeMetadata()

  Gets the list for type declarations (class/interface/enum/annotation) of this unit.

  Returns:
    all typeMetadata of this unit.

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

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