org.glassfish.hk2.classmodel.reflect.impl
Class TypesImpl

java.lang.Object
  extended by org.glassfish.hk2.classmodel.reflect.impl.TypesImpl
All Implemented Interfaces:
TypeBuilder, Types

public class TypesImpl
extends java.lang.Object
implements Types, TypeBuilder

Results of a parsing activity, all java resources are inventoried in three main categories : classes, interfaces and annotations with cross references

Author:
Jerome Dochez

Constructor Summary
TypesImpl()
           
 
Method Summary
 java.util.Collection<Type> getAllTypes()
          Returns a unmodifiable list of collected types obtained during the parsing activity
 AnnotationTypeImpl getAnnotation(java.lang.String name)
           
<T extends Type>
T
getBy(java.lang.Class<T> type, java.lang.String name)
          Returns a Model instance given a name
 Type getBy(java.lang.String name)
          Returns a Type instance given a name
 ClassModel getClassModel(java.lang.String name)
           
 FieldModelImpl getFieldModel(java.lang.String name, TypeProxy type)
           
 TypeProxy getHolder(java.lang.String name)
           
 InterfaceModelImpl getInterface(java.lang.String name)
           
 ModelBuilder getModelBuilder(java.lang.String name, java.lang.String parentName)
           
 TypeImpl getType(int access, java.lang.String name, TypeProxy parent)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TypesImpl

public TypesImpl()
Method Detail

getAllTypes

public java.util.Collection<Type> getAllTypes()
Description copied from interface: Types
Returns a unmodifiable list of collected types obtained during the parsing activity

Specified by:
getAllTypes in interface Types
Returns:
list of types

getBy

public Type getBy(java.lang.String name)
Description copied from interface: Types
Returns a Type instance given a name

Specified by:
getBy in interface Types
Parameters:
name - the requested type name
Returns:
a type instance

getBy

public <T extends Type> T getBy(java.lang.Class<T> type,
                                java.lang.String name)
Description copied from interface: Types
Returns a Model instance given a name

Specified by:
getBy in interface Types
Parameters:
type - type of the requested model
name - the requested type name
Returns:
the type instance or null if not found

getModelBuilder

public ModelBuilder getModelBuilder(java.lang.String name,
                                    java.lang.String parentName)

getType

public TypeImpl getType(int access,
                        java.lang.String name,
                        TypeProxy parent)
Specified by:
getType in interface TypeBuilder

getClassModel

public ClassModel getClassModel(java.lang.String name)
Specified by:
getClassModel in interface TypeBuilder

getInterface

public InterfaceModelImpl getInterface(java.lang.String name)
Specified by:
getInterface in interface TypeBuilder

getAnnotation

public AnnotationTypeImpl getAnnotation(java.lang.String name)
Specified by:
getAnnotation in interface TypeBuilder

getFieldModel

public FieldModelImpl getFieldModel(java.lang.String name,
                                    TypeProxy type)
Specified by:
getFieldModel in interface TypeBuilder

getHolder

public TypeProxy getHolder(java.lang.String name)
Specified by:
getHolder in interface TypeBuilder


Copyright © 2010 Sun Microsystems, Inc.. All Rights Reserved.