Source Code Cross Referenced for Inners.java in  » Ajax » GWT » com » google » gwt » i18n » client » resolutiontest » Java Source Code / Java DocumentationJava Source Code and Java Documentation

Java Source Code / Java Documentation
1. 6.0 JDK Core
2. 6.0 JDK Modules
3. 6.0 JDK Modules com.sun
4. 6.0 JDK Modules com.sun.java
5. 6.0 JDK Modules sun
6. 6.0 JDK Platform
7. Ajax
8. Apache Harmony Java SE
9. Aspect oriented
10. Authentication Authorization
11. Blogger System
12. Build
13. Byte Code
14. Cache
15. Chart
16. Chat
17. Code Analyzer
18. Collaboration
19. Content Management System
20. Database Client
21. Database DBMS
22. Database JDBC Connection Pool
23. Database ORM
24. Development
25. EJB Server geronimo
26. EJB Server GlassFish
27. EJB Server JBoss 4.2.1
28. EJB Server resin 3.1.5
29. ERP CRM Financial
30. ESB
31. Forum
32. GIS
33. Graphic Library
34. Groupware
35. HTML Parser
36. IDE
37. IDE Eclipse
38. IDE Netbeans
39. Installer
40. Internationalization Localization
41. Inversion of Control
42. Issue Tracking
43. J2EE
44. JBoss
45. JMS
46. JMX
47. Library
48. Mail Clients
49. Net
50. Parser
51. PDF
52. Portal
53. Profiler
54. Project Management
55. Report
56. RSS RDF
57. Rule Engine
58. Science
59. Scripting
60. Search Engine
61. Security
62. Sevlet Container
63. Source Control
64. Swing Library
65. Template Engine
66. Test Coverage
67. Testing
68. UML
69. Web Crawler
70. Web Framework
71. Web Mail
72. Web Server
73. Web Services
74. Web Services apache cxf 2.0.1
75. Web Services AXIS2
76. Wiki Engine
77. Workflow Engines
78. XML
79. XML UI
Java
Java Tutorial
Java Open Source
Jar File Download
Java Articles
Java Products
Java by API
Photoshop Tutorials
Maya Tutorials
Flash Tutorials
3ds-Max Tutorials
Illustrator Tutorials
GIMP Tutorials
C# / C Sharp
C# / CSharp Tutorial
C# / CSharp Open Source
ASP.Net
ASP.NET Tutorial
JavaScript DHTML
JavaScript Tutorial
JavaScript Reference
HTML / CSS
HTML CSS Reference
C / ANSI-C
C Tutorial
C++
C++ Tutorial
Ruby
PHP
Python
Python Tutorial
Python Open Source
SQL Server / T-SQL
SQL Server / T-SQL Tutorial
Oracle PL / SQL
Oracle PL/SQL Tutorial
PostgreSQL
SQL / MySQL
MySQL Tutorial
VB.Net
VB.Net Tutorial
Flash / Flex / ActionScript
VBA / Excel / Access / Word
XML
XML Tutorial
Microsoft Office PowerPoint 2007 Tutorial
Microsoft Office Excel 2007 Tutorial
Microsoft Office Word 2007 Tutorial
Java Source Code / Java Documentation » Ajax » GWT » com.google.gwt.i18n.client.resolutiontest 
Source Cross Referenced  Class Diagram Java Document (Java Doc) 


001:        /*
002:         * Copyright 2006 Google Inc.
003:         * 
004:         * Licensed under the Apache License, Version 2.0 (the "License"); you may not
005:         * use this file except in compliance with the License. You may obtain a copy of
006:         * the License at
007:         * 
008:         * http://www.apache.org/licenses/LICENSE-2.0
009:         * 
010:         * Unless required by applicable law or agreed to in writing, software
011:         * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
012:         * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
013:         * License for the specific language governing permissions and limitations under
014:         * the License.
015:         */
016:
017:        package com.google.gwt.i18n.client.resolutiontest;
018:
019:        import com.google.gwt.core.client.GWT;
020:        import com.google.gwt.i18n.client.Constants;
021:        import com.google.gwt.i18n.client.Localizable;
022:        import com.google.gwt.i18n.client.Messages;
023:        import com.google.gwt.i18n.client.TestConstants;
024:        import com.google.gwt.i18n.client.resolutiontest.Inners.InnerClass.ProtectedInnerInnerClass.ExtendsAnotherInner;
025:        import com.google.gwt.i18n.client.resolutiontest.Inners.InnerClass.ProtectedInnerInnerClass.ExtendsAnotherInner.ExtendProtectedInner;
026:        import com.google.gwt.i18n.client.resolutiontest.Inners.OuterLoc.InnerLoc;
027:
028:        import java.util.Map;
029:
030:        /**
031:         * Test class.
032:         */
033:        public class Inners {
034:
035:            public static String testInnerLoc() {
036:                // Check being able to create inner
037:                InnerLoc loc = (InnerLoc) GWT.create(InnerLoc.class);
038:                return loc.string();
039:            }
040:
041:            /**
042:             * Check binding to static inner.
043:             */
044:            public static class OuterLoc implements  Localizable {
045:                public String string() {
046:                    return "default";
047:                }
048:
049:                /**
050:                 * Test Inner Localizable.
051:                 */
052:                protected abstract static class InnerLoc implements  Localizable {
053:                    public abstract String string();
054:                }
055:
056:                /**
057:                 * Inner Localizable Impl.
058:                 */
059:                protected static class InnerLoc_ extends InnerLoc {
060:                    public String string() {
061:                        return "InnerLoc";
062:                    }
063:                }
064:            }
065:
066:            /**
067:             * Test Extension of Inner Inner.
068:             */
069:            public interface ExtendsInnerInner extends InnerClass.InnerInner {
070:                public String extendsInnerInner();
071:            }
072:
073:            /** Test inner localizable. */
074:            public interface LocalizableSimpleInner extends Localizable {
075:                public String getLocalizableInner();
076:            }
077:
078:            /**
079:             * Tests Localizable, Must be static.
080:             */
081:            public static class LocalizableSimpleInner_ implements 
082:                    LocalizableSimpleInner {
083:
084:                public String getLocalizableInner() {
085:                    return "getLocalizableInner";
086:                }
087:            }
088:
089:            /**
090:             * Test embedded constant.
091:             */
092:            public interface HasInner extends SimpleInner {
093:
094:                /**
095:                 * Test inner or constant.
096:                 */
097:                public interface IsInner extends Constants {
098:                    public int isInner();
099:                }
100:
101:                public String hasInner();
102:            }
103:
104:            /**
105:             * Inner class.
106:             */
107:            public static class InnerClass {
108:
109:                /** Test inner inner,abstract,and static localizable. */
110:                public abstract static class LocalizableInnerInner implements 
111:                        Localizable {
112:                    public abstract String string();
113:                }
114:
115:                /** Test inner inner and static localizable. */
116:                public static class LocalizableInnerInner_ extends
117:                        LocalizableInnerInner {
118:                    public String string() {
119:                        return "localizableInnerInner";
120:                    }
121:                }
122:
123:                /**
124:                 * Messages use the same resolution mechanisms as constants, but including a
125:                 * couple of message cases to sanity check.
126:                 */
127:                public static interface InnerInnerMessages extends Messages {
128:                    public String innerClassMessages(String a);
129:                }
130:
131:                /** Test inner interface of inner interface. */
132:                public interface InnerInner extends Outer {
133:                    public float innerInner();
134:                }
135:
136:                /**
137:                 * OuterLoc piglatin binding.
138:                 */
139:                public static class OuterLoc_piglatin extends OuterLoc {
140:                    public String string() {
141:                        return "piglatin";
142:                    }
143:                }
144:
145:                /** Tests Protected Inner Class. */
146:                public String testExtendsAnotherInner() {
147:                    ExtendsAnotherInner clazz = (ExtendsAnotherInner) GWT
148:                            .create(ExtendsAnotherInner.class);
149:                    Map answer = clazz.extendsAnotherInner();
150:                    return answer.toString();
151:                }
152:
153:                /** Test for ExtendProtectedInner. */
154:                public String testExtendsProtectedInner() {
155:                    ExtendProtectedInner inner = (ExtendsAnotherInner.ExtendProtectedInner) GWT
156:                            .create(ExtendProtectedInner.class);
157:                    return inner.extendProtectedInner();
158:                }
159:
160:                /** Another inner class. */
161:                protected static class ProtectedInnerInnerClass {
162:
163:                    /** Test extension. */
164:                    public interface ExtendsAnotherInner extends InnerInner {
165:
166:                        /** Test protected extension. */
167:                        interface ExtendProtectedInner extends ProtectedInner {
168:                            public String extendProtectedInner();
169:                        }
170:
171:                        /** Test maps in extension. */
172:                        public Map extendsAnotherInner();
173:                    }
174:
175:                    /**
176:                     * Checks inner inner and across packages.
177:                     */
178:                    public interface InnerInnerInner extends TestConstants {
179:                        public String[] innerInnerInner();
180:                    }
181:
182:                    /**
183:                     * Messages use the same resolution mechanisms as constants, but including
184:                     * a couple of message cases to sanity check.
185:                     */
186:                    public static interface InnerInnerInnerMessages extends
187:                            InnerInnerMessages {
188:                        public String innerClassMessages(String a);
189:                    }
190:                }
191:            }
192:
193:            /** Tests Simple Constant inheritance. */
194:            public interface SimpleInner extends TestConstants {
195:                public String simpleInner();
196:            }
197:
198:            /**
199:             * Boolean return from protected inner.
200:             */
201:            protected interface ProtectedInner extends TestConstants {
202:                public boolean protectedInner();
203:            }
204:
205:            /**
206:             * Testing protected inner.
207:             */
208:            public boolean testProtectedInner() {
209:                ProtectedInner inner = (ProtectedInner) GWT
210:                        .create(ProtectedInner.class);
211:                return inner.protectedInner();
212:            }
213:        }
214:
215:        /** Used to test extension from package protected file. */
216:        interface Outer extends Constants {
217:            public String outer();
218:        }
www.java2java.com | Contact Us
Copyright 2009 - 12 Demo Source and Support. All rights reserved.
All other trademarks are property of their respective owners.