raven-compiler/src/main/java/org/raven/compiler/Method.java
/**
     * Read or write to a static field in the specified class
     *
     * @param owner The class in which the field is defined
     * @param name  The name of the field
     * @param load  whether we are reading or writing to the field
     */
Read or write to a static field in the specified class
@param owner The class in which the field is defined
@param name  The name of the field
@param load  whether we are reading or writing to the field
Read or write to a static field in the specified class @param owner The class in which the field is defined @param name The name of the field @param load whether we are reading or writing to the field
private void accessStaticField(final String owner, final String name, final boolean load) {
        VarDecl decl = SymbolMap.resolveField(ctx.getOwner(), owner, name);
        if (decl == null) {
            Errors.put("Cannot resolve field " + owner + "." + name);
            return;
        }
        if (decl.isJavaField()) {
            if (load) {
                String type = decl.getTypeDesc();
                final Primitive p = Primitive.getPrimitiveType(type);
                visitFieldInsn(GETSTATIC, owner, name, type);
                if (p != null) {
                    p.wrap(this);
                }
                visitMethodInsn(INVOKESTATIC, getName(Intrinsics.class), "wrap", getDesc(Intrinsics.class, "wrap", Object.class), false);
                return;
            }
            coerce(Type.getType(decl.getTypeDesc()));
        }
        visitFieldInsn(load ? GETSTATIC : PUTSTATIC, owner, name, decl.getTypeDesc());
    }
private void accessStaticField ( final String owner , final String name , final boolean load ) { VarDecl decl = SymbolMap . resolveField ( ctx . getOwner ( ) , owner , name ) ; if ( decl == null ) { Errors . put ( "Cannot resolve field " + owner + "." + name ) ; return ; } if ( decl . isJavaField ( ) ) { if ( load ) { String type = decl . getTypeDesc ( ) ; final Primitive p = Primitive . getPrimitiveType ( type ) ; visitFieldInsn ( GETSTATIC , owner , name , type ) ; if ( p != null ) { p . wrap ( this ) ; } visitMethodInsn ( INVOKESTATIC , getName ( Intrinsics . class ) , "wrap" , getDesc ( Intrinsics . class , "wrap" , Object . class ) , false ) ; return ; } coerce ( Type . getType ( decl . getTypeDesc ( ) ) ) ; } visitFieldInsn ( load ? GETSTATIC : PUTSTATIC , owner , name , decl . getTypeDesc ( ) ) ; }
Read or write to a static field in the specified class
 @param owner The class in which the field is defined
 @param name  The name of the field
 @param load  whether we are reading or writing to the field
Read or write to a static field in the specified class @param owner The class in which the field is defined @param name The name of the field @param load whether we are reading or writing to the field