AccessWrapper prefixWrapper = AccessWrapperFactory.wrapAccess(accessExpr.getPrefix());  if (prefixWrapper != null) { return new FieldAccessWrapper(prefixWrapper, accessExpr.getIdent()); } else {return null;}
return new FieldAccessWrapper(accessExpr.getIdent());
    public static AccessWrapper wrapAccess(JExpression expr) {	if (expr == null) {throw new RuntimeException("null arg passed to wrapAccess");}		// dispatch on type (bad OO, so sue me).	if (expr instanceof JIntLiteral) {	    return new IntegerAccessWrapper((JIntLiteral)expr);	} else if (expr instanceof JThisExpression) {	    return new ThisAccessWrapper();	} else if (expr instanceof JLocalVariableExpression) {	    JLocalVariableExpression lve = (JLocalVariableExpression)expr;	    return new LocalVariableAccessWrapper(lve.getVariable());	} else if (expr instanceof JFieldAccessExpression) {	    JFieldAccessExpression accessExpr = (JFieldAccessExpression)expr;	    AccessWrapper prefixWrapper = AccessWrapperFactory.wrapAccess(accessExpr.getPrefix());	    // if we successfully wrapped the prefix, return a wrapper for the field	    if (prefixWrapper != null) {		return new FieldAccessWrapper(prefixWrapper, accessExpr.getIdent());	    } else {return null;}	} else if (expr instanceof JArrayAccessExpression) {	    JArrayAccessExpression aae = (JArrayAccessExpression)expr;	    // see if we can figure out if the index expression is a constant.	    if (!(aae.getAccessor() instanceof JIntLiteral)) {		return null;	    }	    int index = ((JIntLiteral)aae.getAccessor()).intValue();	    // try and wrap the prefix	    AccessWrapper prefixWrapper = AccessWrapperFactory.wrapAccess(aae.getPrefix());	    if (prefixWrapper != null) {		return new ArrayAccessWrapper(prefixWrapper, index);	    } else {return null;}	} else {	    System.err.println("Warning: can't wrap a : " + expr);	    return null;	}    }