public static JavaConstant ofArrayVarHandle ( TypeDescription typeDescription ) { if ( ! typeDescription . isArray ( ) ) { throw new IllegalArgumentException ( "Not an array type: " + typeDescription ) ; } return new Dynamic ( new ConstantDynamic ( "arrayVarHandle" , JavaType . VAR_HANDLE . getTypeStub ( ) . getDescriptor ( ) , new Handle ( Opcodes . H_INVOKESTATIC , CONSTANT_BOOTSTRAPS , "arrayVarHandle" , "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/Class;Ljava/lang/Class;)Ljava/lang/invoke/VarHandle;" , false ) , Type . getType ( typeDescription . getDescriptor ( ) ) ) , JavaType . VAR_HANDLE . getTypeStub ( ) ) ; }
Resolves a var handle constant for an array .