How can I get bamboo variables to my custom task plugin code

In Bamboo Task API documentation , It is lack of information on how to get various bamboo variables in to custom task codes.

please guide me on how to get those variables to my custom java code through TaskContext object. Any other solution is also acceptable.

 final VariableContext variableContext = taskContext.getCommonContext().getVariableContext();

Thanks @mgardias for the reply.
Actually what I need is get bamboo variables like ${bamboo.planName} , ${bamboo.planRepository..branch} etc…

I have already tried to get those variable values using ,

taskContext.getCommonContext().getVariableContext();

code snippet

and this is what I am getting for above code snippet.

log snippet

simple 30-Jul-2019 12:23:32 buildFailed : false
simple 30-Jul-2019 12:23:32 +++ effective +++
simple 30-Jul-2019 12:23:32 +++ original +++
simple 30-Jul-2019 12:23:32 +++ result +++
simple 30-Jul-2019 12:23:32 buildFailed : false
simple 30-Jul-2019 12:23:32 +++ definitions +++
simple 30-Jul-2019 12:23:32 +++ substitution +++

But still I can not figure out a way to access those variables.