factory.java

来自「基于mvc的宠物管理系统。servlet+jsp」· Java 代码 · 共 54 行

JAVA
54
字号
/*工厂类*/
package com.richard.service;

import com.richard.dao.*;

public class Factory {
    public Factory() {
    }

    public static InterfaceOfEmployee createEmployee() {         //用于产生一个InterfaceOfEmployee对象
        return new ClassOfEmployee();
    }

    public static InterfaceOfOwners createOwners()//用于产生一个InterfaceOfOwners对象
    {
        return new ClassOfOwners();
    }

    public static InterfaceOfPets createPets()
    {
        return new ClassOfPets();
    }

    public static InterfaceOfViewOfPets createViewOfPets()
    {
        return new ClassOfViewOfPets();
    }

    public static InterfaceOfTypes createTypes()
    {
        return new ClassOfTypes();
    }

    public static InterfaceOfViewOfVetsDetails createVetsDetails()
    {
        return new ClassOfViewOfVetsDetails();
    }

    public static InterfaceOfSpecialties createSpecialties()
    {
        return new ClassOfSpecialties();
    }

    public static InterfaceOfVets createVets()
    {
        return new ClassOfVets();
    }

    public static InterfaceOfVet_specialties createVet_Specialties()
    {
        return new ClassOfVet_specialties();
    }
}

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?