raven-compiler/src/main/java/org/raven/compiler/Method.java
/**
     * Access a non-locally defined field. This may include static fields
     * in other classes or fields nested inside of local variables or fields
     *
     * @param names Names of the fields (fields may have several levels of nesting)
     * @param load  whether we are reading or writing to the field
     */
Access a non-locally defined field. This may include static fields
in other classes or fields nested inside of local variables or fields

@param names Names of the fields (fields may have several levels of nesting)
@param load  whether we are reading or writing to the field
Access a non - locally defined field . This may include static fields in other classes or fields nested inside of local variables or fields @param names Names of the fields ( fields may have several levels of nesting ) @param load whether we are reading or writing to the field
private void accessNonLocalField(final String[] names, final boolean load) {
        String importedClass = getInternalNameFromImports(names[0]);
        VarDecl decl = SymbolMap.resolveField(ctx.getOwner(), ctx.getOwner(), names[0]);
        if (importedClass != null) {
            accessStaticField(importedClass, names[1], load || names.length > 2);
            String[] virtualNames = Arrays.copyOfRange(names, 2, names.length);
            accessVirtualField(virtualNames, load);
        } else {
            if (decl != null) {
                visitFieldInsn(GETSTATIC, ctx.getOwner().replace(".", "/"), names[0], Constants.TOBJ_SIG);
                String[] virtualNames = Arrays.copyOfRange(names, 1, names.length);
                accessVirtualField(virtualNames, load);
            } else {
                Errors.put("Variable " + names[0] + " has not been defined.");
            }
        }
    }
private void accessNonLocalField ( final String [ ] names , final boolean load ) { String importedClass = getInternalNameFromImports ( names [ 0 ] ) ; VarDecl decl = SymbolMap . resolveField ( ctx . getOwner ( ) , ctx . getOwner ( ) , names [ 0 ] ) ; if ( importedClass != null ) { accessStaticField ( importedClass , names [ 1 ] , load || names . length > 2 ) ; String [ ] virtualNames = Arrays . copyOfRange ( names , 2 , names . length ) ; accessVirtualField ( virtualNames , load ) ; } else { if ( decl != null ) { visitFieldInsn ( GETSTATIC , ctx . getOwner ( ) . replace ( "." , "/" ) , names [ 0 ] , Constants . TOBJ_SIG ) ; String [ ] virtualNames = Arrays . copyOfRange ( names , 1 , names . length ) ; accessVirtualField ( virtualNames , load ) ; } else { Errors . put ( "Variable " + names [ 0 ] + " has not been defined." ) ; } } }
Access a non-locally defined field.
Access a non - locally defined field .