Package com.avrix.agent
Class ClassTransformer
java.lang.Object
com.avrix.agent.ClassTransformer
- Direct Known Subclasses:
PatchBanSteamIDCommand,PatchBanUserCommand,PatchChatServer,PatchGameKeyboard,PatchGameServer,PatchGameWindow,PatchKickUserCommand,PatchLuaEventManager,PatchLuaManager,PatchLuaManagerExposer,PatchQuitCommand,PatchRenderThread,PatchSpriteRenderer,PatchTranslator,PatchUIManager,PatchUnbanSteamIDCommand,PatchUnbanUserCommand,PatchZLogger
A class for transforming Java classes at runtime.
-
Constructor Summary
ConstructorsConstructorDescriptionClassTransformer(String className) Constructor for creating aClassTransformerobject. -
Method Summary
Modifier and TypeMethodDescriptionfinal voidApplying modifications to the class being modified.final StringGetting the full name of the class that needs to be modified.Gets theClassModifier.ClassModifierBuilderfor building class modifiers.abstract voidMethod for performing class modification.
-
Constructor Details
-
ClassTransformer
Constructor for creating aClassTransformerobject.- Parameters:
className- the full name of the class that needs to be modified, e.g. 'zombie.GameWindow'
-
-
Method Details
-
getModifierBuilder
Gets theClassModifier.ClassModifierBuilderfor building class modifiers.- Returns:
- the
ClassModifier.ClassModifierBuilderinstance.
-
getClassName
Getting the full name of the class that needs to be modified.- Returns:
- the full class name, e.g. 'zombie.GameWindow'
-
modifyClass
public abstract void modifyClass()Method for performing class modification. The implementing method must contain the logic for modifying the target class. -
applyModifications
public final void applyModifications()Applying modifications to the class being modified. Called after themodifyClass()method is called
-