Class Signature
java.lang.Object
org.glassfish.pfl.dynamic.codegen.spi.Signature
Represents the signature of a method, which is sometimes needed
for selecting the correct method.
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionargTypes()private voidcheckArgTypeCompatibility(List<Type> atypes) private booleancheckArgTypeCompatibility(List<Type> atypes, boolean throwsException) voidcheckCompatibility(Type targetType, String ident, List<Expression> args) Check whether the list of expression in args is statically compatible with this Signature.private voidcheckCompatibility(Type targetType, String ident, List<Expression> args, boolean isStaticMethod) voidcheckConstructorCompatibility(Type targetType, List<Expression> args) Check whether the list of expression in args is statically compatible with this Signature.voidcheckStaticCompatibility(Type targetType, String ident, List<Expression> args) Check whether the list of expression in args is statically compatible with this Signature.displayAsMethod(String methodName) booleanstatic SignaturefromCall(Type type, String ident, List<Expression> exprs) static SignaturefromCallUsingTypes(Type type, String ident, List<Type> types) static SignaturefromConstructor(Type type, List<Expression> exprs) static SignaturefromConstructorUsingTypes(Type type, List<Type> types) private static SignaturefromMethodCall(Type type, String ident, List<Expression> exprs, boolean isStaticCall) private static SignaturefromMethodCallUsingTypes(Type type, String ident, List<Type> types, boolean isStaticCall) static SignaturefromStaticCall(Type type, String ident, List<Expression> exprs) static SignaturefromStaticCallUsingTypes(Type type, String ident, List<Type> types) private static StringgetCallTypeString(Signature.CallType ct, String ident) private static ClassInfogetClassInfo(Type type) private static Set<MethodInfo> getCompatibleMethods(Set<MethodInfo> methods, List<Type> argTypes) getExprTypes(List<Expression> exprs) private static StringgetMethodListString(Set<MethodInfo> mlist) private static Set<MethodInfo> getMethods(Type type, String ident, boolean staticOnly) private static StringgetTypeListString(List<Type> types) inthashCode()static Signatureprivate static MethodInforeturnCompatibleMethod(Type type, String ident, List<Type> argTypes, Signature.CallType ctype, Set<MethodInfo> compatibleMethods) private static StringtoString()
-
Field Details
-
rtype
-
types
-
signature
-
-
Constructor Details
-
Signature
-
-
Method Details
-
make
-
returnType
-
argTypes
-
hashCode
public int hashCode() -
toString
-
signature
-
displayAsMethod
-
displayAsMethod
-
equals
-
checkArgTypeCompatibility
-
checkArgTypeCompatibility
-
getExprTypes
-
getClassInfo
-
checkCompatibility
private void checkCompatibility(Type targetType, String ident, List<Expression> args, boolean isStaticMethod) -
checkCompatibility
Check whether the list of expression in args is statically compatible with this Signature. This means that args and this.types have the same length, and the type of each expression in args is assignment compatible with the corresponding types in this.types. Also, the targetType must actually contain a non-static method of the appropriate signature and name.- Throws:
IllegalArgumentException- if args is not compatible with this.types.
-
checkStaticCompatibility
Check whether the list of expression in args is statically compatible with this Signature. This means that args and this.types have the same length, and the type of each expression in args is assignment compatible with the corresponding types in this.types. Also, the targetType must actually contain a static method of the appropriate signature and name.- Throws:
IllegalArgumentException- if args is not compatible with this.types.
-
checkConstructorCompatibility
Check whether the list of expression in args is statically compatible with this Signature. This means that args and this.types have the same length, and the type of each expression in args is assignment compatible with the corresponding types in this.types. Also, the targetType must actually contain a constructor of the appropriate signature and name.- Throws:
IllegalArgumentException- if args is not compatible with this.types.
-
getMethods
-
getCompatibleMethods
-
sprintf
-
getCallTypeString
-
getTypeListString
-
getMethodListString
-
returnCompatibleMethod
private static MethodInfo returnCompatibleMethod(Type type, String ident, List<Type> argTypes, Signature.CallType ctype, Set<MethodInfo> compatibleMethods) -
fromMethodCallUsingTypes
-
fromMethodCall
private static Signature fromMethodCall(Type type, String ident, List<Expression> exprs, boolean isStaticCall) -
fromCall
-
fromCallUsingTypes
-
fromStaticCall
-
fromStaticCallUsingTypes
-
fromConstructorUsingTypes
-
fromConstructor
-