Modifier and Type | Field and Description |
---|---|
protected StructureModifier<java.lang.Object> |
PacketContainer.structureModifier |
Modifier and Type | Method and Description |
---|---|
StructureModifier<java.lang.Boolean> |
PacketContainer.getBooleans()
Retrieves a read/write structure for every boolean field.
|
StructureModifier<byte[]> |
PacketContainer.getByteArrays()
Retrieves a read/write structure for every byte array field.
|
StructureModifier<java.lang.Byte> |
PacketContainer.getBytes()
Retrieves a read/write structure for every byte field.
|
StructureModifier<WrappedDataWatcher> |
PacketContainer.getDataWatcherModifier()
Retrieves a read/write structure for data watchers.
|
StructureModifier<java.lang.Double> |
PacketContainer.getDoubles()
Retrieves a read/write structure for every double field.
|
StructureModifier<org.bukkit.entity.Entity> |
PacketContainer.getEntityModifier(org.bukkit.World world)
Retrieves a read/write structure for entity objects.
|
StructureModifier<java.lang.Float> |
PacketContainer.getFloat()
Retrieves a read/write structure for every float field.
|
StructureModifier<int[]> |
PacketContainer.getIntegerArrays()
Retrieves a read/write structure for every int array field.
|
StructureModifier<java.lang.Integer> |
PacketContainer.getIntegers()
Retrieves a read/write structure for every integer field.
|
StructureModifier<org.bukkit.inventory.ItemStack[]> |
PacketContainer.getItemArrayModifier()
Retrieves a read/write structure for arrays of ItemStacks.
|
StructureModifier<org.bukkit.inventory.ItemStack> |
PacketContainer.getItemModifier()
Retrieves a read/write structure for ItemStack.
|
StructureModifier<java.lang.Long> |
PacketContainer.getLongs()
Retrieves a read/write structure for every long field.
|
StructureModifier<java.lang.Object> |
PacketContainer.getModifier()
Retrieves the generic structure modifier for this packet.
|
StructureModifier<NbtBase<?>> |
PacketContainer.getNbtModifier()
Retrieves a read/write structure for NBT classes.
|
StructureModifier<java.util.List<ChunkPosition>> |
PacketContainer.getPositionCollectionModifier()
Retrieves a read/write structure for collections of chunk positions.
|
StructureModifier<ChunkPosition> |
PacketContainer.getPositionModifier()
Retrieves a read/write structure for chunk positions.
|
StructureModifier<java.lang.Short> |
PacketContainer.getShorts()
Retrieves a read/write structure for every short field.
|
<T> StructureModifier<T> |
PacketContainer.getSpecificModifier(java.lang.Class<T> primitiveType)
Retrieves a read/write structure for every field with the given type.
|
StructureModifier<java.lang.String[]> |
PacketContainer.getStringArrays()
Retrieves a read/write structure for every String array field.
|
StructureModifier<java.lang.String> |
PacketContainer.getStrings()
Retrieves a read/write structure for every String field.
|
StructureModifier<java.util.List<WrappedWatchableObject>> |
PacketContainer.getWatchableCollectionModifier()
Retrieves a read/write structure for collections of watchable objects.
|
StructureModifier<org.bukkit.WorldType> |
PacketContainer.getWorldTypeModifier()
Retrieves a read/write structure for the world type enum.
|
Constructor and Description |
---|
PacketContainer(int id,
java.lang.Object handle,
StructureModifier<java.lang.Object> structure)
Creates a packet container for an existing packet.
|
Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.Class,StructureModifier> |
StructureModifier.subtypeCache |
Modifier and Type | Method and Description |
---|---|
StructureModifier<TField> |
StructureModifier.modify(int fieldIndex,
com.google.common.base.Function<TField,TField> select)
Correctly modifies the value of a field.
|
protected <T> StructureModifier<T> |
StructureModifier.withFieldType(java.lang.Class fieldType,
java.util.List<java.lang.reflect.Field> filtered,
java.util.Map<java.lang.reflect.Field,java.lang.Integer> defaults,
EquivalentConverter<T> converter)
Create a new structure modifier for the new field type.
|
StructureModifier<TField> |
StructureModifier.withTarget(java.lang.Object target)
Retrieves a structure modifier of the same type for a different object target.
|
<T> StructureModifier<T> |
StructureModifier.withType(java.lang.Class fieldType)
Retrieves a structure modifier that only reads and writes fields of a given type.
|
<T> StructureModifier<T> |
StructureModifier.withType(java.lang.Class fieldType,
EquivalentConverter<T> converter)
Retrieves a structure modifier that only reads and writes fields of a given type.
|
StructureModifier<TField> |
StructureModifier.write(int fieldIndex,
TField value)
Writes the value of a field given its index.
|
StructureModifier<TField> |
StructureModifier.writeDefaults()
Sets all non-primitive fields to a more fitting default value.
|
StructureModifier<TField> |
StructureModifier.writeSafely(int fieldIndex,
TField value)
Writes the value of a given field IF and ONLY if it exists.
|
Modifier and Type | Method and Description |
---|---|
protected void |
StructureModifier.initialize(StructureModifier<TField> other)
Initialize using the same field types.
|
protected void |
ObjectWriter.transformField(StructureModifier<java.lang.Object> modifierSource,
StructureModifier<java.lang.Object> modifierDest,
int fieldIndex)
Called for every non-static field that will be copied.
|
protected void |
ObjectWriter.transformField(StructureModifier<java.lang.Object> modifierSource,
StructureModifier<java.lang.Object> modifierDest,
int fieldIndex)
Called for every non-static field that will be copied.
|
Modifier and Type | Method and Description |
---|---|
protected void |
StructureModifier.initialize(java.lang.Class targetType,
java.lang.Class fieldType,
java.util.List<java.lang.reflect.Field> data,
java.util.Map<java.lang.reflect.Field,java.lang.Integer> defaultFields,
EquivalentConverter<TField> converter,
java.util.Map<java.lang.Class,StructureModifier> subTypeCache)
Initialize every field of this class.
|
protected void |
StructureModifier.initialize(java.lang.Class targetType,
java.lang.Class fieldType,
java.util.List<java.lang.reflect.Field> data,
java.util.Map<java.lang.reflect.Field,java.lang.Integer> defaultFields,
EquivalentConverter<TField> converter,
java.util.Map<java.lang.Class,StructureModifier> subTypeCache,
boolean useStructureCompiler)
Initialize every field of this class.
|
Modifier and Type | Method and Description |
---|---|
protected void |
FieldCloner.defaultTransform(StructureModifier<java.lang.Object> modifierSource,
StructureModifier<java.lang.Object> modifierDest,
Cloner defaultCloner,
int fieldIndex)
Default implementation of the field transform.
|
protected void |
FieldCloner.defaultTransform(StructureModifier<java.lang.Object> modifierSource,
StructureModifier<java.lang.Object> modifierDest,
Cloner defaultCloner,
int fieldIndex)
Default implementation of the field transform.
|
Modifier and Type | Class and Description |
---|---|
class |
CompiledStructureModifier
Represents a compiled structure modifier.
|
Modifier and Type | Method and Description |
---|---|
<TField> StructureModifier<TField> |
StructureCompiler.compile(StructureModifier<TField> source)
Compiles the given structure modifier.
|
StructureModifier<java.lang.Object> |
CompiledStructureModifier.withTarget(java.lang.Object target) |
StructureModifier<java.lang.Object> |
CompiledStructureModifier.write(int index,
java.lang.Object value) |
StructureModifier<java.lang.Object> |
CompiledStructureModifier.writeDefaults() |
protected abstract StructureModifier<java.lang.Object> |
CompiledStructureModifier.writeGenerated(int index,
java.lang.Object value) |
Modifier and Type | Method and Description |
---|---|
<TKey> void |
BackgroundCompiler.addListener(StructureModifier<TKey> uncompiled,
CompileListener<TKey> listener)
Add a compile listener if we are still waiting for the structure modifier to be compiled.
|
<TField> StructureModifier<TField> |
StructureCompiler.compile(StructureModifier<TField> source)
Compiles the given structure modifier.
|
<TField> boolean |
StructureCompiler.lookupClassLoader(StructureModifier<TField> source)
Lookup the current class loader for any previously generated classes before we attempt to generate something.
|
void |
CompileListener.onCompiled(StructureModifier<TKey> compiledModifier)
Invoked when a structure modifier has been successfully compiled.
|
<TKey> void |
BackgroundCompiler.scheduleCompilation(StructureModifier<TKey> uncompiled,
CompileListener<TKey> listener)
Ensure that the given structure modifier is eventually compiled.
|
Modifier and Type | Method and Description |
---|---|
void |
BackgroundCompiler.scheduleCompilation(java.util.Map<java.lang.Class,StructureModifier> cache,
java.lang.Class key)
Ensure that the indirectly given structure modifier is eventually compiled.
|
Modifier and Type | Field and Description |
---|---|
protected StructureModifier<java.lang.Object> |
WrappedWatchableObject.modifier |