private void checkPropertyOnExplicitThis ( PropertyExpression pe ) { if ( ! currentScope . isInStaticContext ( ) ) return ; Expression object = pe . getObjectExpression ( ) ; if ( ! ( object instanceof VariableExpression ) ) return ; VariableExpression ve = ( VariableExpression ) object ; if ( ! ve . getName ( ) . equals ( "this" ) ) return ; String name = pe . getPropertyAsString ( ) ; if ( name == null || name . equals ( "class" ) ) return ; Variable member = findClassMember ( currentClass , name ) ; if ( member == null ) return ; checkVariableContextAccess ( member , pe ) ; }
a property on this like this . x is transformed to a direct field access so we need to check the static context here