Class Method
Describes the parameters, return type and further attributes of a Windows API function, COM interface function or delegate.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionReturns the constant value returned by this method.dll()Gets the name of the DLL containing this Windows function.final LazyStringReturns the URL to Microsoft's documentation about this type.booleanIndicates if this method returns anything, i.e., it is not set to the void type.intGets theMethodDefindex.name()Gets the method name.Gets the method's namespace.Gets the native method name.Gets the method parameters.Gets all types directly referenced by this method.voidreplaceTypes(UnaryOperator<Type> typeReplacer) Replaces the types of the parameters and return type with different types.Gets this method's return type.voidsetConstantValue(Object constantValue) Returns the constant value returned by this method.voidSets the name of the DLL containing this Windows function.final voidsetDocumentationUrl(LazyString documentationUrl) Sets the URL to Microsoft's documentation about this type.voidSets the method name.voidsetParameters(Parameter[] parameters) Sets the method parameters.voidsetReturnType(Type returnType) Sets the return type.voidsetSupportsLastError(boolean supportsLastError) Sets if this method uses theGetLastErrorfunction to provide error details.booleanIndicates if this method uses theGetLastErrorfunction to provide error details.
-
Constructor Details
-
Method
-
-
Method Details
-
name
Gets the method name.For architecture-specific methods, this is the modified method name, as used for Java code.
- Returns:
- the name
-
setName
Sets the method name.For architecture-specific methods, this is the modified method name, as used for Java code.
- Parameters:
name- the name
-
nativeName
Gets the native method name.For architecture-specific types, this is the original function name used by Windows.
- Returns:
- native method name
-
namespace
-
methodDefIndex
public int methodDefIndex()Gets theMethodDefindex.- Returns:
- the index
-
replaceTypes
Replaces the types of the parameters and return type with different types.If the type should not be changed, the given lambda should return the received type.
- Parameters:
typeReplacer- lambda providing the target type for the current type
-
returnType
Gets this method's return type.If the method does not return anything, the return type is the primitive void type is returned.
- Returns:
- the return type
-
setReturnType
Sets the return type.If the method does not return anything, the type must be set to the primitive void type.
- Parameters:
returnType- the return type
-
parameters
-
setParameters
Sets the method parameters.- Parameters:
parameters- the parameters
-
referencedTypes
-
dll
Gets the name of the DLL containing this Windows function.Not applicable to COM interface methods and delegates.
- Returns:
- the DLL name
-
setDll
Sets the name of the DLL containing this Windows function.Not applicable to COM interface methods and delegates.
- Parameters:
dll- the DLL name
-
hasReturnType
public boolean hasReturnType()Indicates if this method returns anything, i.e., it is not set to the void type.- Returns:
trueif the returns anything,falseotherwise
-
supportsLastError
public boolean supportsLastError()Indicates if this method uses theGetLastErrorfunction to provide error details.- Returns:
trueifGetLastErroris supported
-
setSupportsLastError
public void setSupportsLastError(boolean supportsLastError) Sets if this method uses theGetLastErrorfunction to provide error details.- Parameters:
supportsLastError-trueifGetLastErroris supported,falseotherwise
-
constantValue
Returns the constant value returned by this method.A few Windows functions do not exist but are C macros returning a constant value. This is the constant value.
- Returns:
- the constant value
-
setConstantValue
Returns the constant value returned by this method.A few Windows functions do not exist but are C macros returning a constant value. This is the constant value.
- Parameters:
constantValue- the constant value
-
documentationUrl
Returns the URL to Microsoft's documentation about this type.- Returns:
- the URL
-
setDocumentationUrl
Sets the URL to Microsoft's documentation about this type.- Parameters:
documentationUrl- the URL
-