KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com4j > tlbimp > driver > Ref


1 package com4j.tlbimp.driver;
2
3 import com4j.GUID;
4
5 /**
6  * Reference to another type library and which package it is in.
7  *
8  * @author Kohsuke Kawaguchi (kk@kohsuke.org)
9  */

10 final class Ref {
11     GUID libid;
12     String JavaDoc packageName;
13
14     public void setLibid(String JavaDoc libid) {
15         this.libid = new GUID(libid);
16     }
17
18     public void setPackageName(String JavaDoc packageName) {
19         this.packageName = packageName;
20     }
21
22     /**
23      * Makes sure if the class is properly configured.
24      */

25     void validate() {
26         if(libid==null)
27             throw new IllegalArgumentException JavaDoc("libid is not set");
28
29         if(packageName==null)
30             throw new IllegalArgumentException JavaDoc("package name is not set");
31     }
32 }
33
Popular Tags