1 /*
   2  * Copyright (c) 2015, Oracle and/or its affiliates. All rights reserved.
   3  * ORACLE PROPRIETARY/CONFIDENTIAL. Use is subject to license terms.
   4  */
   5 package com.sun.java.accessibility;
   6 
   7 import javax.accessibility.AccessibilityProvider;
   8 
   9 /* This class provided methods to identify and activate the mapping from the
  10  * JavaAccessBridge API to the Java Accessibility API.
  11  */
  12 public final class ProviderImpl extends AccessibilityProvider {
  13     /**
  14      * Typically the service name returned by the name() method would be a simple
  15      * name such as JavaAccessBridge, but the following name is used for compatibility
  16      * with prior versions of ${user.home}/.accessibility.properties and
  17      * ${java.home}/conf/accessibility.properties where the text on the
  18      * assistive.technologies= line is a fully qualified class name. As of Java 9
  19      * class names are no longer used to identify assistive technology implementations.
  20      * If the properties file exists the installer will not replace it thus the
  21      * need for compatibility.
  22      */
  23     private final String name = "com.sun.java.accessibility.AccessBridge";
  24     
  25     public ProviderImpl() {}
  26 
  27     public String getName() {
  28         return name;
  29     }
  30 
  31     public void activate() {
  32         /**
  33          * Note that the AccessBridge is instantiated here rather than in the
  34          * constructor.  If the caller determines that this object is named
  35          * "com.sun.java.accessibility.AccessBridge" then the caller will call
  36          * start to instantiate the AccessBridge which will in turn activate it.
  37          */
  38         new AccessBridge();
  39     }
  40 
  41 }