RECODER 0.92

recoder.service
Class DefaultByteCodeInfo

java.lang.Object
  extended by recoder.AbstractService
      extended by recoder.service.DefaultProgramModelInfo
          extended by recoder.service.DefaultByteCodeInfo
All Implemented Interfaces:
Service, ByteCodeInfo, ProgramModelInfo, TuningParameters

public class DefaultByteCodeInfo
extends DefaultProgramModelInfo
implements ByteCodeInfo


Nested Class Summary
 
Nested classes/interfaces inherited from class recoder.service.DefaultProgramModelInfo
DefaultProgramModelInfo.ResolvedTypeArgument
 
Field Summary
 
Fields inherited from class recoder.AbstractService
serviceConfiguration
 
Fields inherited from interface recoder.TuningParameters
INITIAL_CROSS_REFERENCER_ELEMENT2REFERENCE_HASH_SET_SIZE, INITIAL_SOURCE_INFO_NAME2PRIMITIVE_HASH_SET_SIZE, INITIAL_SOURCE_INFO_REFERENCE2ELEMENT_HASH_SET_SIZE
 
Constructor Summary
DefaultByteCodeInfo(ServiceConfiguration config)
           
 
Method Summary
 Type getAnnotationType(AnnotationUseInfo au)
          Returns the (annotation) type of the given annotation use.
 ClassFile getClassFile(ClassType ct)
          Returns the bytecode counterpart of the given classtype.
 ClassTypeContainer getClassTypeContainer(ClassType ct)
          Returns the class type container for the given class type.
 ConstructorInfo getConstructorInfo(Constructor c)
          Returns the bytecode counterpart of the given constructor.
 java.util.List<? extends Constructor> getConstructors(ClassType ct)
          Returns the constructors locally defined within the given class type.
 ClassType getContainingClassType(Member m)
          Returns the logical parent class of the given member.
 java.util.List<ClassType> getExceptions(Method m)
          Returns the exceptions of the given method or constructor.
 FieldInfo getFieldInfo(Field f)
          Returns the bytecode counterpart of the given field.
 java.util.List<? extends Field> getFields(ClassType ct)
          Returns the fields locally defined within the given class type.
 MethodInfo getMethodInfo(Method m)
          Returns the bytecode counterpart of the given method.
 java.util.List<Method> getMethods(ClassType ct)
          Returns the methods locally defined within the given class type.
 Package getPackage(ProgramModelElement pme)
          Returns the package of the given program model element.
 Type getReturnType(Method m)
          Returns the return type of the given method.
 java.util.List<Type> getSignature(Method m)
          Returns the signature of the given method or constructor.
 java.util.List<ClassType> getSupertypes(ClassType ct)
          Returns the list of locally declared supertypes of the given class type.
 Type getType(ByteCodeElement bce)
           
 Type getType(ProgramModelElement pme)
          Returns the type of the given program model element.
 java.util.List<? extends ClassType> getTypes(ClassTypeContainer ctc)
          Returns the class types locally defined within the given container.
 void register(ClassFile cf)
          Registers a new class file for the service.
 
Methods inherited from class recoder.service.DefaultProgramModelInfo
containsTypeParameter, containsTypeParameter, containsTypeParameter, doThreePhaseFilter, eraseType, eraseTypes, filterApplicableMethods, filterMostSpecificMethods, filterMostSpecificMethodsPhase2, filterMostSpecificMethodsPhase3, getAllFields, getAllMethods, getAllSubtypes, getAllSubtypes, getAllSubtypes, getAllSupertypes, getAllSupertypes, getAllTypes, getBaseType, getBoxedType, getCapture, getCommonSupertype, getConstructors, getConstructors, getMethods, getMethods, getOutermostType, getPromotedType, getSubtypes, getSubtypes, getSupertypes, getUnboxedType, isCompatibleSignature, isCompatibleSignature, isSubtype, isSupertype, isVisibleFor, isWidening, isWidening, isWidening, isWidening, makeParameterizedArrayType, removeErasedTypesFromList, replaceAllTypeParametersWithArgs, replaceAllTypeParametersWithArgs, reset
 
Methods inherited from class recoder.AbstractService
getServiceConfiguration, initialize
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface recoder.service.ProgramModelInfo
containsTypeParameter, containsTypeParameter, containsTypeParameter, eraseType, eraseTypes, filterApplicableMethods, filterMostSpecificMethods, filterMostSpecificMethodsPhase2, filterMostSpecificMethodsPhase3, getAllFields, getAllMethods, getAllSubtypes, getAllSubtypes, getAllSubtypes, getAllSupertypes, getAllSupertypes, getAllTypes, getBoxedType, getCommonSupertype, getConstructors, getMethods, getMethods, getPromotedType, getSubtypes, getSubtypes, getSupertypes, getUnboxedType, isCompatibleSignature, isCompatibleSignature, isSubtype, isSupertype, isVisibleFor, isWidening, isWidening, isWidening, isWidening, removeErasedTypesFromList
 
Methods inherited from interface recoder.Service
getServiceConfiguration, initialize
 

Constructor Detail

DefaultByteCodeInfo

public DefaultByteCodeInfo(ServiceConfiguration config)
Parameters:
config - the configuration this services becomes part of.
Method Detail

getClassFile

public final ClassFile getClassFile(ClassType ct)
Description copied from interface: ByteCodeInfo
Returns the bytecode counterpart of the given classtype. Returns null, if the given type is not a class file.

Specified by:
getClassFile in interface ByteCodeInfo
Parameters:
ct - a class type.

getMethodInfo

public final MethodInfo getMethodInfo(Method m)
Description copied from interface: ByteCodeInfo
Returns the bytecode counterpart of the given method. Returns null , if the given method is not a method info.

Specified by:
getMethodInfo in interface ByteCodeInfo
Parameters:
m - a method.

getConstructorInfo

public final ConstructorInfo getConstructorInfo(Constructor c)
Description copied from interface: ByteCodeInfo
Returns the bytecode counterpart of the given constructor. Returns null, if the given constructor is not a constructor info.

Specified by:
getConstructorInfo in interface ByteCodeInfo
Parameters:
c - a constructor.

getFieldInfo

public final FieldInfo getFieldInfo(Field f)
Description copied from interface: ByteCodeInfo
Returns the bytecode counterpart of the given field. Returns null , if the given field is not a field info.

Specified by:
getFieldInfo in interface ByteCodeInfo
Parameters:
f - a field.

getType

public Type getType(ByteCodeElement bce)

getType

public Type getType(ProgramModelElement pme)
Description copied from interface: ProgramModelInfo
Returns the type of the given program model element. For types this is the model element itself, for variables it is their defined type and for methods it is their statically defined return type.

Specified by:
getType in interface ProgramModelInfo
Parameters:
pme - the program model element to analyze.
Returns:
the type of the program element or null if the type is unknown or unavailable.

getPackage

public Package getPackage(ProgramModelElement pme)
Description copied from interface: ProgramModelInfo
Returns the package of the given program model element.

Specified by:
getPackage in interface ProgramModelInfo
Parameters:
pme - a program model element.
Returns:
the package of that object (may be null).

getTypes

public java.util.List<? extends ClassType> getTypes(ClassTypeContainer ctc)
Description copied from interface: ProgramModelInfo
Returns the class types locally defined within the given container. Returns inner types when the container itself is a class type. Note that there is no guarantee about the order of the types returned.

Specified by:
getTypes in interface ProgramModelInfo
Parameters:
ctc - a class type container.
Returns:
a list of contained class types.

getClassTypeContainer

public ClassTypeContainer getClassTypeContainer(ClassType ct)
Description copied from interface: ProgramModelInfo
Returns the class type container for the given class type.

Specified by:
getClassTypeContainer in interface ProgramModelInfo
Parameters:
ct - a class type.
Returns:
the container of the given type.

getSupertypes

public java.util.List<ClassType> getSupertypes(ClassType ct)
Description copied from interface: ProgramModelInfo
Returns the list of locally declared supertypes of the given class type.

Specified by:
getSupertypes in interface ProgramModelInfo
Parameters:
ct - a class type.
Returns:
the list of locally defined supertypes of the given type.

getFields

public java.util.List<? extends Field> getFields(ClassType ct)
Description copied from interface: ProgramModelInfo
Returns the fields locally defined within the given class type. If the type is represented in source code, the returned list matches the syntactic order.

Specified by:
getFields in interface ProgramModelInfo
Parameters:
ct - a class type.
Returns:
the list of field members of the given type.

getMethods

public java.util.List<Method> getMethods(ClassType ct)
Description copied from interface: ProgramModelInfo
Returns the methods locally defined within the given class type. If the type is represented in source code, the returned list matches the syntactic order.

Specified by:
getMethods in interface ProgramModelInfo
Parameters:
ct - a class type.
Returns:
the list of methods of the given type.

getConstructors

public java.util.List<? extends Constructor> getConstructors(ClassType ct)
Description copied from interface: ProgramModelInfo
Returns the constructors locally defined within the given class type. If the type is represented in source code, the returned list matches the syntactic order.

Specified by:
getConstructors in interface ProgramModelInfo
Parameters:
ct - a class type.
Returns:
the list of constructors of the given type.

getContainingClassType

public ClassType getContainingClassType(Member m)
Description copied from interface: ProgramModelInfo
Returns the logical parent class of the given member.

Specified by:
getContainingClassType in interface ProgramModelInfo
Parameters:
m - a member.
Returns:
the class type containing the given member.

getSignature

public java.util.List<Type> getSignature(Method m)
Description copied from interface: ProgramModelInfo
Returns the signature of the given method or constructor.

Specified by:
getSignature in interface ProgramModelInfo
Parameters:
m - a method (or constructor).
Returns:
the signature of the given method.

getExceptions

public java.util.List<ClassType> getExceptions(Method m)
Description copied from interface: ProgramModelInfo
Returns the exceptions of the given method or constructor. If the method is represented in source code, the returned list matches the syntactic order.

Specified by:
getExceptions in interface ProgramModelInfo
Parameters:
m - a method (or constructor).
Returns:
the exceptions of the given method.

getReturnType

public Type getReturnType(Method m)
Description copied from interface: ProgramModelInfo
Returns the return type of the given method.

Specified by:
getReturnType in interface ProgramModelInfo
Parameters:
m - a method.
Returns:
the return type of the given method.

register

public void register(ClassFile cf)
Description copied from interface: ByteCodeInfo
Registers a new class file for the service.

Specified by:
register in interface ByteCodeInfo
Parameters:
cf - the new class file.

getAnnotationType

public Type getAnnotationType(AnnotationUseInfo au)
Description copied from interface: ByteCodeInfo
Returns the (annotation) type of the given annotation use.

Specified by:
getAnnotationType in interface ByteCodeInfo
Parameters:
au - an annotation use
Returns:
the type of the referenced annotation type

RECODER 0.92