Class JavaMembers

java.lang.Object
org.mozilla.javascript.JavaMembers
Direct Known Subclasses:
JavaMembers_jdk11

class JavaMembers extends Object
See Also:
  • Field Details

  • Constructor Details

  • Method Details

    • has

      boolean has(String name, boolean isStatic)
    • get

      Object get(Scriptable scope, String name, Object javaObject, boolean isStatic)
    • put

      void put(Scriptable scope, String name, Object javaObject, Object value, boolean isStatic)
    • getIds

      Object[] getIds(boolean isStatic)
    • javaSignature

      static String javaSignature(Class<?> type)
    • liveConnectSignature

      static String liveConnectSignature(Class<?>[] argTypes)
    • findExplicitFunction

      private MemberBox findExplicitFunction(String name, boolean isStatic)
    • getExplicitFunction

      private Object getExplicitFunction(Scriptable scope, String name, Object javaObject, boolean isStatic)
    • discoverAccessibleMethods

      private Method[] discoverAccessibleMethods(Class<?> clazz, boolean includeProtected, boolean includePrivate)
      Retrieves mapping of methods to accessible methods for a class. In case the class is not public, retrieves methods with same signature as its public methods from public superclasses and interfaces (if they exist). Basically upcasts every method to the nearest accessible method.
    • discoverAccessibleMethods

      private void discoverAccessibleMethods(Class<?> clazz, Map<JavaMembers.MethodSignature,Method> map, boolean includeProtected, boolean includePrivate)
    • discoverPublicMethods

      void discoverPublicMethods(Class<?> clazz, Map<JavaMembers.MethodSignature,Method> map)
    • registerMethod

      static void registerMethod(Map<JavaMembers.MethodSignature,Method> map, Method method)
    • reflect

      private void reflect(Scriptable scope, boolean includeProtected, boolean includePrivate)
    • getAccessibleConstructors

      private Constructor<?>[] getAccessibleConstructors(boolean includePrivate)
    • getAccessibleFields

      private Field[] getAccessibleFields(boolean includeProtected, boolean includePrivate)
    • findGetter

      private static MemberBox findGetter(boolean isStatic, Map<String,Object> ht, String prefix, String propertyName)
    • extractGetMethod

      private static MemberBox extractGetMethod(MemberBox[] methods, boolean isStatic)
    • extractSetMethod

      private static MemberBox extractSetMethod(Class<?> type, MemberBox[] methods, boolean isStatic)
    • extractSetMethod

      private static MemberBox extractSetMethod(MemberBox[] methods, boolean isStatic)
    • getFieldAndMethodsObjects

      Map<String,FieldAndMethods> getFieldAndMethodsObjects(Scriptable scope, Object javaObject, boolean isStatic)
    • lookupClass

      static JavaMembers lookupClass(Scriptable scope, Class<?> dynamicType, Class<?> staticType, boolean includeProtected)
    • createJavaMembers

      private static JavaMembers createJavaMembers(Scriptable associatedScope, Class<?> cl, boolean includeProtected)
    • getSecurityContext

      private static Object getSecurityContext()
    • reportMemberNotFound

      RuntimeException reportMemberNotFound(String memberName)