View Javadoc

1   package delight.rhinosandox.internal;
2   
3   import org.mozilla.javascript.NativeJavaObject;
4   import org.mozilla.javascript.Scriptable;
5   
6   @SuppressWarnings("all")
7   public class SafeNativeJavaObject extends NativeJavaObject {
8     public SafeNativeJavaObject(final Scriptable scope, final Object javaObject, final Class<?> staticType) {
9       super(scope, javaObject, staticType);
10    }
11    
12    @Override
13    public Object get(final String name, final Scriptable start) {
14      boolean _equals = "getClass".equals(name);
15      if (_equals) {
16        return Scriptable.NOT_FOUND;
17      }
18      return super.get(name, start);
19    }
20  }