EMMA Coverage Report (generated Mon Oct 17 05:41:20 EDT 2011)
[all classes][org.jclouds.trmk.vcloud_0_8.compute.domain]

COVERAGE SUMMARY FOR SOURCE FILE [KeyPairCredentials.java]

nameclass, %method, %block, %line, %
KeyPairCredentials.java50%  (1/2)0%   (0/7)0%   (0/43)0%   (0/11)

COVERAGE BREAKDOWN BY CLASS AND METHOD

nameclass, %method, %block, %line, %
     
class KeyPairCredentials100% (1/1)0%   (0/3)0%   (0/22)0%   (0/5)
KeyPairCredentials (String, KeyPair): void 0%   (0/1)0%   (0/9)0%   (0/3)
getKeyPair (): KeyPair 0%   (0/1)0%   (0/3)0%   (0/1)
toBuilder (): KeyPairCredentials$Builder 0%   (0/1)0%   (0/10)0%   (0/1)
     
class KeyPairCredentials$Builder0%   (0/1)0%   (0/4)0%   (0/21)0%   (0/6)
KeyPairCredentials$Builder (): void 0%   (0/1)0%   (0/3)0%   (0/1)
build (): KeyPairCredentials 0%   (0/1)0%   (0/8)0%   (0/1)
identity (String): KeyPairCredentials$Builder 0%   (0/1)0%   (0/5)0%   (0/2)
keyPair (KeyPair): KeyPairCredentials$Builder 0%   (0/1)0%   (0/5)0%   (0/2)

1/**
2 * Licensed to jclouds, Inc. (jclouds) under one or more
3 * contributor license agreements.  See the NOTICE file
4 * distributed with this work for additional information
5 * regarding copyright ownership.  jclouds licenses this file
6 * to you under the Apache License, Version 2.0 (the
7 * "License"); you may not use this file except in compliance
8 * with the License.  You may obtain a copy of the License at
9 *
10 *   http://www.apache.org/licenses/LICENSE-2.0
11 *
12 * Unless required by applicable law or agreed to in writing,
13 * software distributed under the License is distributed on an
14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
15 * KIND, either express or implied.  See the License for the
16 * specific language governing permissions and limitations
17 * under the License.
18 */
19package org.jclouds.trmk.vcloud_0_8.compute.domain;
20 
21import org.jclouds.domain.Credentials;
22import org.jclouds.trmk.vcloud_0_8.domain.KeyPair;
23 
24/**
25 * @author Adrian Cole
26 */
27public class KeyPairCredentials extends Credentials {
28 
29   public static class Builder<T extends KeyPairCredentials> extends Credentials.Builder<T> {
30      private String identity;
31      private KeyPair keyPair;
32 
33      public Builder<T> identity(String identity) {
34         this.identity = identity;
35         return this;
36      }
37 
38      public Builder<T> keyPair(KeyPair keyPair) {
39         this.keyPair = keyPair;
40         return this;
41      }
42 
43      @SuppressWarnings("unchecked")
44      public T build() {
45         return (T) new KeyPairCredentials(identity, keyPair);
46      }
47   }
48 
49   public KeyPair getKeyPair() {
50      return keyPair;
51   }
52 
53   private final KeyPair keyPair;
54 
55   public KeyPairCredentials(String identity, KeyPair keyPair) {
56      super(identity, keyPair.getPrivateKey());
57      this.keyPair = keyPair;
58   }
59 
60   public Builder<? extends KeyPairCredentials> toBuilder() {
61      return new Builder<KeyPairCredentials>().identity(identity).keyPair(keyPair);
62   }
63 
64}

[all classes][org.jclouds.trmk.vcloud_0_8.compute.domain]
EMMA 2.0.5312 (C) Vladimir Roubtsov