如果我们增加了不应有的方法,继承这个接口的类将不得不同时实现这些方法。
If we add methods that should not be there the classes implementing the interface will have to implement those methods as well.
实现了这个接口的类可以适配到另一接口。
Classes implementing this interface can be adapted to another interface.
对于许多接口,大多数功能都可以用对于所有使用这个接口的类都有效的“样板”代码来实现。
For many interfaces, much of the functionality can be implemented with "boilerplate" code that will be valid for all classes that use the interface.
这个阶段准备代表每个类中定义的字段、方法和实现接口所必需的数据结构。
This stage prepares the necessary data structures that represent fields, methods, and implemented interfaces that are defined within each class.
这个接口使实现代码简单了——在处理字节码时这总是一个优点——但是也意味着实现类是非常特定的。
This interface keeps the implementation code simple — always an advantage when working with bytecode — but means that the implementation class is very specific.
实现类的这个注释允许您从生成的服务接口(清单5)的相应注释中重写设置。
This annotation on the implementation class allows you to override Settings from the corresponding annotation in the generated service interface (Listing 5).
基本的解决方案是定义可以用静态编译的代码访问的基类或者接口,然后生成的类扩展这个基类或者实现这个接口。
The basic solution is to define a base class or interface that can be accessed by the statically compiled code, then extend that base class or implement that interface in the generated class.
如果服务实现类实现这个接口,就需要JAX - RPC运行时系统来管理相应的服务端点实例的生存周期。
If a service implementation class implements this interface, the JAX-RPC runtime system is required to manage the life cycle of the corresponding service endpoint instances.
我们实现这个类来提供一些公共方法并隐藏SNMP接口的细节。
We implemented this class to provide some common methods and to hide the details of the SNMP interface.
定义一个关系,指明那两个新建的类是这个接口的实现。
Define a relationship which indicates that the two newly created classes are implementers of the interface.
正如前面提到的,这个类必须实现CSProcess接口。
As mentioned before, this class must implement the CSProcess interface.
由于您是从一个预定义bean开始的,因此这个实现类用作接口。
Since you started with a predefined bean, you are using the implementation class as the interface.
创建扩展这个接口的类,提供其自己对 getFeed()方法的实现。
You create classes extending this interface that provide their own implementation of the getFeed() method .
在使用formatter类时,可以将实现了这个接口的对象传递给构造函数Formatter以把它作为目标。
An object implementing this interface can be used as the destination when using a Formatter class by passing the object into the Formatter constructor.
这个类是服务注册中心Repository类的一个具体实现,它为数据访问层提供了基础的接口。
This is a specific implementation of the Repository class for Service Registry, which provides the primary interface to the data access layer.
资源适配器可以在其部署描述符(ra . xml)的resourceadapter - class元素中给出实现这个接口的类的名称。
A resource adapter can give the name of a class implementing this interface in the resourceadapter-class element of its deployment descriptor (ra.xml).
它不是创建一个实现了接口的类、并将这个实现注册到需要监听的事件所在的组件上,而是创建一个EventHandler实例并注册它。
Instead of creating a class that implements an interface and registering that implementation with the component whose event you are interested in, you create an EventHandler instance and register it.
在这个建模面板中,选择InterfaceRealization并实现从类到接口的转变。
From the modeling palette, select the interface realization and draw these realizations from the classes to the interface.
如果找到这个类,就返回一个实现了Connection接口的对象,如图1所示。
If found, an object is returned that implements the Connection interface, as shown in Figure 1.
藉由这个新的接口,开发人员可以实现service异步调用过程中的细粒度通知,但它并没有提供Callback类中的轮询机制。
This new interface allows for finer grained notifications during the asynchronous invocation of a service, but it does not provide the polling mechanism formerly found in the Callback class.
DAO模式的这个实现包含下面列出的类和接口
This implementation of the DAO pattern consists of the classes and interfaces shown below
这个类通过实现CAIComponentSPI的接口,使用CAI架构履行业务组件契约。
This class fulfills the business component contract with the CAI architecture by implementing interfaces of the CAI component SPI.
从编程的角度看,过滤器类将实现Filter接口,然后使用这个过滤器类中的FilterChain和FilterConfig接口。
From a programming standpoint, your filter class will implement the filter interface and then use the FilterChain and FilterConfig interfaces within your filter class.
作为对这个接口的补充,这个服务端点实现类可能实现ServiceLifecycle接口来管理服务的生命周期(请参阅图1)。
In addition to that interface, this service endpoint implementation class may implement the ServiceLifecycle interface for managing the service's life cycle (see Figure 1).
在这个实现中,IControlsFactoryInterface接口类定义了被具体工厂支持的接口。
In this implementation IControlsFactoryInterface interface defines the interface, supported by specific factory.
现在如果一个Bird类(如Ostrich)实现了这个接口,那么它需要实现不必要的Fly()行为(Ostrich不会飞)。
Now, if a Bird class (say, Ostrich) implements this interface, it has to implement the Fly() behaviour unnecessarily (Ostrich doesn't fly).
这个实现类将是EchoService接口的默认实现,如清单3所示。
This implementation class will be the default implementation for the EchoService interface, shown in Listing 3.
清单5给出了这个类的代码,这个类必须实现com. sun . xml . wss . impl . callback . PasswordValidationCallback . PasswordValidator接口。
Listing 5 shows the code for this class, which must implement the com.sun.xml.wss.impl.callback.PasswordValidationCallback.PasswordValidator interface.
这指定了将来处理菜单选项选择的类的名字,这个类必须实现IWorkbenchWindowActionDelegate接口。
This specifies the name of the class that will handle the menu choice selection, a class that must implement the IWorkbenchWindowActionDelegate interface.
清单4给出ridemanager bean的类声明,这个无状态会话bean实现了清单1所示的RideManagerRemote接口。
Listing 4 shows the class declaration for RideManagerBean, the stateless session bean that implements the RideManagerRemote interface used in Listing 1.
应用推荐