Class Member
java.lang.Object
net.codecrete.windowsapi.metadata.Member
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionduplicate(UnaryOperator<Type> typeReplacer) Creates a copy of this member, replacing its type.intGets the field index.booleanIndicates if this member is part of a C bitfield.name()Gets the member name.intoffset()Gets the member offset within the struct.intSets the padding length after this member.voidsetOffset(int offset) Sets the member offset within the struct.voidsetPaddingAfter(int paddingAfter) Sets the padding length after this member.type()Gets the member type.value()Gets the member value.
-
Constructor Details
-
Member
-
-
Method Details
-
name
-
fieldIndex
public int fieldIndex()Gets the field index.- Returns:
- the index
-
type
-
value
-
offset
public int offset()Gets the member offset within the struct.- Returns:
- the offset (in bytes)
-
setOffset
public void setOffset(int offset) Sets the member offset within the struct.- Parameters:
offset- the offset (in bytes)
-
paddingAfter
public int paddingAfter()Sets the padding length after this member.- Returns:
- the padding length (in bytes)
-
setPaddingAfter
public void setPaddingAfter(int paddingAfter) Sets the padding length after this member.- Parameters:
paddingAfter- the padding length (in bytes)
-
isBitField
public boolean isBitField()Indicates if this member is part of a C bitfield.- Returns:
trueif it is part of a bitfield,falseotherwise
-
duplicate
Creates a copy of this member, replacing its type.- Parameters:
typeReplacer- lambda providing the target type for the current type- Returns:
- the member copy
-