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.
- Author:
- Ken Cavanaugh
-
Method Summary
Modifier and TypeMethodDescriptionargTypes()voidcheckCompatibility(Type targetType, String ident, List<Expression> args) Check whether the list of expression in args is statically compatible with this Signature.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) static SignaturefromStaticCall(Type type, String ident, List<Expression> exprs) static SignaturefromStaticCallUsingTypes(Type type, String ident, List<Type> types) inthashCode()static SignaturetoString()
-
Method Details
-
make
-
returnType
-
argTypes
-
hashCode
public int hashCode() -
toString
-
signature
-
displayAsMethod
-
displayAsMethod
-
equals
-
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.
-
fromCall
-
fromCallUsingTypes
-
fromStaticCall
-
fromStaticCallUsingTypes
-
fromConstructorUsingTypes
-
fromConstructor
-