LCOV - code coverage report
Current view: top level - server/api - GerritApiImpl.java (source / functions) Hit Total Coverage
Test: _coverage_report.dat Lines: 14 14 100.0 %
Date: 2022-11-19 15:00:39 Functions: 7 7 100.0 %

          Line data    Source code
       1             : // Copyright (C) 2013 The Android Open Source Project
       2             : //
       3             : // Licensed under the Apache License, Version 2.0 (the "License");
       4             : // you may not use this file except in compliance with the License.
       5             : // You may obtain a copy of the License at
       6             : //
       7             : // http://www.apache.org/licenses/LICENSE-2.0
       8             : //
       9             : // Unless required by applicable law or agreed to in writing, software
      10             : // distributed under the License is distributed on an "AS IS" BASIS,
      11             : // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
      12             : // See the License for the specific language governing permissions and
      13             : // limitations under the License.
      14             : 
      15             : package com.google.gerrit.server.api;
      16             : 
      17             : import com.google.gerrit.extensions.api.GerritApi;
      18             : import com.google.gerrit.extensions.api.accounts.Accounts;
      19             : import com.google.gerrit.extensions.api.changes.Changes;
      20             : import com.google.gerrit.extensions.api.config.Config;
      21             : import com.google.gerrit.extensions.api.groups.Groups;
      22             : import com.google.gerrit.extensions.api.plugins.Plugins;
      23             : import com.google.gerrit.extensions.api.projects.Projects;
      24             : import com.google.inject.Inject;
      25             : import com.google.inject.Singleton;
      26             : 
      27             : @Singleton
      28             : class GerritApiImpl implements GerritApi {
      29             :   private final Accounts accounts;
      30             :   private final Changes changes;
      31             :   private final Config config;
      32             :   private final Groups groups;
      33             :   private final Projects projects;
      34             :   private final Plugins plugins;
      35             : 
      36             :   @Inject
      37             :   GerritApiImpl(
      38             :       Accounts accounts,
      39             :       Changes changes,
      40             :       Config config,
      41             :       Groups groups,
      42             :       Projects projects,
      43         149 :       Plugins plugins) {
      44         149 :     this.accounts = accounts;
      45         149 :     this.changes = changes;
      46         149 :     this.config = config;
      47         149 :     this.groups = groups;
      48         149 :     this.projects = projects;
      49         149 :     this.plugins = plugins;
      50         149 :   }
      51             : 
      52             :   @Override
      53             :   public Accounts accounts() {
      54          34 :     return accounts;
      55             :   }
      56             : 
      57             :   @Override
      58             :   public Changes changes() {
      59          91 :     return changes;
      60             :   }
      61             : 
      62             :   @Override
      63             :   public Config config() {
      64           5 :     return config;
      65             :   }
      66             : 
      67             :   @Override
      68             :   public Groups groups() {
      69          33 :     return groups;
      70             :   }
      71             : 
      72             :   @Override
      73             :   public Projects projects() {
      74         143 :     return projects;
      75             :   }
      76             : 
      77             :   @Override
      78             :   public Plugins plugins() {
      79           3 :     return plugins;
      80             :   }
      81             : }

Generated by: LCOV version 1.16+git.20220603.dfeb750