Top Description Methods
org.glassfish.pfl.dynamic.codegen.spi

public Interface ClassInfo

Known Direct Subinterfaces
org.glassfish.pfl.dynamic.codegen.spi.ModifiableClass, org.glassfish.pfl.dynamic.codegen.spi.ClassGenerator
Known Direct Implementers
org.glassfish.pfl.dynamic.codegen.impl.ClassInfoBase
Imports
java.util.List, .Map, .Set

An interface that provides information about classes. This can be used to describe both ClassGenerators that are used to generate code and pre-existing Java classes.

Method Summary

Modifier and TypeMethod and Description
public String
className()

Return the class name of the class represented by this ClassInfo relative to pkgName().

public Set<MethodInfo>
public Map<String, FieldInfo>
fieldInfo()

Return a map from field names to FieldInfo instances for every field defined in this class (not including super types).

public MethodInfo
findConstructorInfo(Signature sig)

Find the MethodInfo (if any) for a Constructor with the given Signature in this ClassInfo.

public FieldInfo
findFieldInfo(String name)

Find a field with the given name if one exists.

public MethodInfo
findMethodInfo(String name, Signature sig)

Find the method (if any) with the given name and Signature in this ClassInfo, or in any superType of this ClassInfo.

public List<Type>
impls()

Return the list of Types of interfaces implemented by this class.

public boolean
isInterface()

Return true iff this ClassInfo is an interface.

public boolean
isSubclass(ClassInfo info)

Return true iff this is a subclass or subinterface of info.

public Map<String, Set<MethodInfo>>
methodInfoByName()

Return methodInfo for all methods defined on this class.

public int
modifiers()

Return the modifiers on this class as specified in java.lang.reflect.Modifier.

public String
name()

Return the fully qualified class name for this ClassInfo.

public String
pkgName()

Return the fully qualified package name containing the class represented by this ClassInfo.

public Type
superType()

Return the Type of the supertype of this class.

public Type
thisType()

Return the Type of the class represented by this ClassInfo.

Method Detail

classNameback to summary
public String className()

Return the class name of the class represented by this ClassInfo relative to pkgName().

constructorInfoback to summary
public Set<MethodInfo> constructorInfo()
fieldInfoback to summary
public Map<String, FieldInfo> fieldInfo()

Return a map from field names to FieldInfo instances for every field defined in this class (not including super types).

findConstructorInfoback to summary
public MethodInfo findConstructorInfo(Signature sig)

Find the MethodInfo (if any) for a Constructor with the given Signature in this ClassInfo.

findFieldInfoback to summary
public FieldInfo findFieldInfo(String name)

Find a field with the given name if one exists. Searches this class and all super classes.

findMethodInfoback to summary
public MethodInfo findMethodInfo(String name, Signature sig)

Find the method (if any) with the given name and Signature in this ClassInfo, or in any superType of this ClassInfo.

implsback to summary
public List<Type> impls()

Return the list of Types of interfaces implemented by this class. May be empty, but never null.

isInterfaceback to summary
public boolean isInterface()

Return true iff this ClassInfo is an interface.

isSubclassback to summary
public boolean isSubclass(ClassInfo info)

Return true iff this is a subclass or subinterface of info.

methodInfoByNameback to summary
public Map<String, Set<MethodInfo>> methodInfoByName()

Return methodInfo for all methods defined on this class. This does not include inherited methods. Here we return a map from method name to the set of MethodInfo instances for all methods with the same method name. This form is useful for handling method overload resolution.

modifiersback to summary
public int modifiers()

Return the modifiers on this class as specified in java.lang.reflect.Modifier.

nameback to summary
public String name()

Return the fully qualified class name for this ClassInfo.

pkgNameback to summary
public String pkgName()

Return the fully qualified package name containing the class represented by this ClassInfo.

superTypeback to summary
public Type superType()

Return the Type of the supertype of this class.

thisTypeback to summary
public Type thisType()

Return the Type of the class represented by this ClassInfo.