Class Type
java.lang.Object
net.codecrete.windowsapi.metadata.Type
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LazyStringThe documentation URL.protected StringThe type name.protected final NamespaceThe namespace this type belongs to.protected final StringThe native type name.protected final intTheTypeDefindex in the metadata file. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal LazyStringReturns the URL to Microsoft's documentation about this type.final booleanIndicates if this type is anonymous, i.e., has an artificial name only.final Stringname()Gets the type name.final NamespaceGets the type's namespace.final StringGets the native type name.Returns the types directly references by this type.voidreplaceTypes(UnaryOperator<Type> typeReplacement) Replace the types directly referenced by this type with the provided replacements.final voidsetDocumentationUrl(LazyString documentationUrl) Sets the URL to Microsoft's documentation about this type.final voidSets the type name.final intGets theTypeDefindex
-
Field Details
-
name
The type name. -
nativeName
The native type name. -
namespace
The namespace this type belongs to.Not set for nested types.
-
typeDefIndex
protected final int typeDefIndexTheTypeDefindex in the metadata file. -
documentationUrl
The documentation URL.
-
-
Constructor Details
-
Type
-
-
Method Details
-
name
Gets the type name.For architecture-specific types, this is the modified type name, as used for Java code.
- Returns:
- type name
-
setName
-
nativeName
Gets the native type name.For architecture-specific types, this is the original type name used by Windows.
- Returns:
- native type name
-
namespace
Gets the type's namespace.Types enclosed in other types do not have a namespace.
- Returns:
- namespace
-
typeDefIndex
public final int typeDefIndex()Gets theTypeDefindex- Returns:
- the index
-
isAnonymous
public final boolean isAnonymous()Indicates if this type is anonymous, i.e., has an artificial name only.Only types enclosed in other types can be anonymous.
- Returns:
- if the type is anonymous
-
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
-
referencedTypes
-
replaceTypes
Replace the types directly referenced by this type with the provided replacements.The lambda for replacement lookup will return the same type if no replacement is needed.
- Parameters:
typeReplacement- lambda for looking up the replacement type.
-