public static Reference getInstance ( Object o , String key ) { if ( o instanceof Reference ) { return new ReferenceReference ( ( Reference ) o , key ) ; } Collection coll = Caster . toCollection ( o , null ) ; if ( coll != null ) return new VariableReference ( coll , key ) ; return new NativeReference ( o , key ) ; }
returns a Reference Instance