Class TypeMaker
java.lang.Object
org.jd.core.v1.service.converter.classfiletojavasyntax.util.TypeMaker
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static classstatic classprivate static classstatic class -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate TypeMaker.ClassPathLoaderprivate HashMap<String, ObjectType> private static final HashMap<String, ObjectType> private HashMap<String, TypeMaker.MethodTypes> private HashMap<String, ObjectType> private HashMap<String, TypeMaker.TypeTypes> private Loaderprivate HashMap<String, TypeMaker.MethodTypes> private HashMap<Long, ObjectType> -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic intcountDimension(String descriptor) private ObjectTypeprivate static StringextractLocalClassName(String name) private static String[]getExceptionTypeNames(Method method) private static booleanprivate static booleanbooleanisAssignable(Map<String, BaseType> typeBounds, ObjectType left, ObjectType right) private static booleanprivate static booleanprivate booleanisRawTypeAssignable(long leftHashCode, String leftInternalName, String rightInternalName) booleanisRawTypeAssignable(ObjectType left, ObjectType right) private Object[]loadClassFile(String internalTypeName, ClassFileReader reader) private Object[]loadConstants(ClassFileReader reader) private booleanloadFieldsAndMethods(String internalTypeName) private voidloadFieldsAndMethods(String internalTypeName, byte[] data) private TypeloadFieldType(String internalTypeName, String fieldName, String descriptor) private TypeloadFieldType(ObjectType objectType, String fieldName, String descriptor) private TypeMaker.MethodTypesloadMethodTypes(String internalTypeName, String methodName, String descriptor) private TypeMaker.MethodTypesloadMethodTypes(ObjectType objectType, String methodName, String descriptor) private ObjectTypeprivate ObjectTypemakeFieldType(String internalTypeName, String fieldName, String descriptor) makeFromDescriptor(String descriptor) makeFromDescriptorOrInternalTypeName(String descriptorOrInternalTypeName) private ObjectTypemakeFromDescriptorWithoutBracket(String descriptor) makeFromInternalTypeName(String internalTypeName) makeFromSignature(String signature) makeMethodTypes(String descriptor) makeMethodTypes(String internalTypeName, String methodName, String descriptor) makeTypeTypes(String internalTypeName) private TypeMaker.TypeTypesmakeTypeTypes(String internalTypeName, byte[] data) private BooleanmultipleMethods(String internalTypeName, String suffixKey) booleanmultipleMethods(String internalTypeName, String name, int parameterCount) parseClassFileSignature(ClassFile classFile) Rules: ClassSignature: TypeParameters? SuperclassSignature SuperInterfaceSignature* SuperclassSignature: ClassTypeSignature SuperInterfaceSignature: ClassTypeSignatureprivate ObjectTypeparseClassTypeSignature(TypeMaker.SignatureReader reader, int dimension) Rules: ClassTypeSignature: 'L' PackageSpecifier* SimpleClassTypeSignature ClassTypeSignatureSuffix* ';' SimpleClassTypeSignature: Identifier TypeArguments? ClassTypeSignatureSuffix: '.' SimpleClassTypeSignatureprivate TypeRules: ThrowsSignature: '^' ClassTypeSignature | '^' TypeVariableSignatureparseFieldSignature(ClassFile classFile, Field field) private TypeMaker.MethodTypesparseMethodSignature(String signature, String[] exceptionTypeNames) Rules: MethodTypeSignature: TypeParameters? '(' ReferenceTypeSignature* ')' ReturnType ThrowsSignature* ReturnType: TypeSignature | VoidDescriptor ThrowsSignature: '^' ClassTypeSignature | '^' TypeVariableSignatureprivate TypeMaker.MethodTypesparseMethodSignature(String descriptor, String signature, String[] exceptionTypeNames) parseMethodSignature(ClassFile classFile, Method method) private TypeMaker.MethodTypesparseMethodSignature(Method method, String key) private TypeRules: ReferenceTypeSignature: ClassTypeSignature | ArrayTypeSignature | TypeVariableSignature SimpleClassTypeSignature: Identifier TypeArguments? ArrayTypeSignature: '[' TypeSignature TypeSignature: '[' FieldTypeSignature | '[' BaseType BaseType: 'B' | 'C' | 'D' | 'F' | 'I' | 'J' | 'S' | 'Z' TypeVariableSignature: 'T' Identifier ';'private TypeArgumentRules: TypeArgument: WildcardIndicator? FieldTypeSignature | '*' WildcardIndicator: '+' | '-'private BaseTypeArgumentRules: TypeArguments: 'invalid input: '<'' TypeArgument+ '>'private TypeParameterRules: TypeParameter: Identifier ClassBound InterfaceBound* ClassBound: ':' FieldTypeSignature? InterfaceBound: ':' FieldTypeSignatureprivate BaseTypeParameterRules: TypeParameters: 'invalid input: '<'' TypeParameter+ '>'private ObjectTypesearchSuperParameterizedType(long superHashCode, String superInternalTypeName, ObjectType objectType) searchSuperParameterizedType(ObjectType superObjectType, ObjectType objectType) private static voidskipAttributes(ClassFileReader reader) private static voidskipMembers(ClassFileReader reader)
-
Field Details
-
INTERNALNAME_TO_OBJECTPRIMITIVETYPE
-
signatureToType
-
internalTypeNameFieldNameToType
-
descriptorToObjectType
-
internalTypeNameToObjectType
-
internalTypeNameToTypeTypes
-
internalTypeNameMethodNameParameterCountToBoolean
-
internalTypeNameMethodNameDescriptorToMethodTypes
-
signatureToMethodTypes
-
assignableRawTypes
-
superParameterizedObjectTypes
-
hierarchy
-
classPathLoader
-
loader
-
-
Constructor Details
-
TypeMaker
-
-
Method Details
-
parseClassFileSignature
Rules: ClassSignature: TypeParameters? SuperclassSignature SuperInterfaceSignature* SuperclassSignature: ClassTypeSignature SuperInterfaceSignature: ClassTypeSignature -
parseMethodSignature
-
parseMethodSignature
-
getExceptionTypeNames
-
parseFieldSignature
-
makeFromSignature
-
countDimension
-
parseMethodSignature
private TypeMaker.MethodTypes parseMethodSignature(String descriptor, String signature, String[] exceptionTypeNames) -
parseMethodSignature
Rules: MethodTypeSignature: TypeParameters? '(' ReferenceTypeSignature* ')' ReturnType ThrowsSignature* ReturnType: TypeSignature | VoidDescriptor ThrowsSignature: '^' ClassTypeSignature | '^' TypeVariableSignature -
parseTypeParameters
Rules: TypeParameters: 'invalid input: '<'' TypeParameter+ '>' -
parseTypeParameter
Rules: TypeParameter: Identifier ClassBound InterfaceBound* ClassBound: ':' FieldTypeSignature? InterfaceBound: ':' FieldTypeSignature -
parseExceptionSignature
Rules: ThrowsSignature: '^' ClassTypeSignature | '^' TypeVariableSignature -
parseClassTypeSignature
Rules: ClassTypeSignature: 'L' PackageSpecifier* SimpleClassTypeSignature ClassTypeSignatureSuffix* ';' SimpleClassTypeSignature: Identifier TypeArguments? ClassTypeSignatureSuffix: '.' SimpleClassTypeSignature -
parseTypeArguments
Rules: TypeArguments: 'invalid input: '<'' TypeArgument+ '>' -
parseReferenceTypeSignature
Rules: ReferenceTypeSignature: ClassTypeSignature | ArrayTypeSignature | TypeVariableSignature SimpleClassTypeSignature: Identifier TypeArguments? ArrayTypeSignature: '[' TypeSignature TypeSignature: '[' FieldTypeSignature | '[' BaseType BaseType: 'B' | 'C' | 'D' | 'F' | 'I' | 'J' | 'S' | 'Z' TypeVariableSignature: 'T' Identifier ';' -
parseTypeArgument
Rules: TypeArgument: WildcardIndicator? FieldTypeSignature | '*' WildcardIndicator: '+' | '-' -
isAReferenceTypeSignature
-
isAClassTypeSignature
-
isATypeArguments
-
isATypeArgument
-
extractLocalClassName
-
makeFromDescriptorOrInternalTypeName
-
makeFromDescriptor
-
makeFromDescriptorWithoutBracket
-
makeFromInternalTypeName
-
create
-
searchSuperParameterizedType
-
isAssignable
-
searchSuperParameterizedType
private ObjectType searchSuperParameterizedType(long superHashCode, String superInternalTypeName, ObjectType objectType) -
isRawTypeAssignable
-
isRawTypeAssignable
-
makeTypeTypes
-
makeTypeTypes
- Throws:
Exception
-
makeFieldType
-
loadFieldType
-
loadFieldType
-
makeMethodTypes
-
makeMethodTypes
public TypeMaker.MethodTypes makeMethodTypes(String internalTypeName, String methodName, String descriptor) -
loadMethodTypes
private TypeMaker.MethodTypes loadMethodTypes(String internalTypeName, String methodName, String descriptor) -
loadMethodTypes
private TypeMaker.MethodTypes loadMethodTypes(ObjectType objectType, String methodName, String descriptor) -
loadType
-
loadType
- Throws:
Exception
-
loadFieldsAndMethods
-
loadFieldsAndMethods
-
loadClassFile
- Throws:
Exception
-
skipMembers
-
loadConstants
- Throws:
Exception
-
skipAttributes
-
multipleMethods
-
multipleMethods
-