Note that the Simple compiler will only recognize Java fields marked 28 | * with this annotation. All other fields will be ignored. 29 | * 30 | * @author Herbert Czymontek 31 | */ 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(ElementType.FIELD) 34 | public @interface SimpleDataElement { 35 | } 36 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/annotations/SimpleEvent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to mark Simple event definitions. 26 | * 27 | * @author Herbert Czymontek 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | @Target(ElementType.METHOD) 31 | public @interface SimpleEvent { 32 | } 33 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/annotations/SimpleFunction.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to mark Simple functions. 26 | * 27 | *
Note that the Simple compiler will only recognize Java methods marked 28 | * with this annotation. All other methods will be ignored. 29 | * 30 | * @author Herbert Czymontek 31 | */ 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(ElementType.METHOD) 34 | public @interface SimpleFunction { 35 | } 36 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/annotations/SimpleObject.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to mark Simple objects. 26 | * 27 | *
Note that the Simple compiler will only recognize Java classes marked 28 | * with this annotation. All other classes will be ignored. 29 | * 30 | * @author Herbert Czymontek 31 | */ 32 | @Retention(RetentionPolicy.RUNTIME) 33 | @Target(ElementType.TYPE) 34 | public @interface SimpleObject { 35 | } 36 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/annotations/UsesPermissions.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.annotations; 18 | 19 | import java.lang.annotation.ElementType; 20 | import java.lang.annotation.Retention; 21 | import java.lang.annotation.RetentionPolicy; 22 | import java.lang.annotation.Target; 23 | 24 | /** 25 | * Annotation to indicate Android permissions required by components. 26 | * 27 | * @author Mark Friedman 28 | */ 29 | @Retention(RetentionPolicy.RUNTIME) 30 | @Target(ElementType.TYPE) 31 | public @interface UsesPermissions { 32 | 33 | /** 34 | * The names of the permissions separated by commas. 35 | * 36 | * @return the permission name 37 | */ 38 | String permissionNames() default ""; 39 | } 40 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/ComponentContainer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | /** 20 | * Components that can contain other components need to implement this 21 | * interface. 22 | * 23 | * @author Herbert Czymontek 24 | */ 25 | public interface ComponentContainer { 26 | 27 | /** 28 | * Adds a component to the container. 29 | * 30 | * @param component component to add 31 | */ 32 | void addComponent(Component component); 33 | 34 | /** 35 | * Returns the layout associated with the container. 36 | * 37 | * @return container layout 38 | */ 39 | Layout getLayout(); 40 | } 41 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/FrameLayout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Frame layout for Simple components. 23 | * 24 | * @author David Foster 25 | */ 26 | @SimpleObject 27 | public interface FrameLayout extends Layout { 28 | } 29 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/Image.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleComponent; 20 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 21 | import com.google.devtools.simple.runtime.annotations.SimpleProperty; 22 | import com.google.devtools.simple.runtime.annotations.UsesPermissions; 23 | 24 | /** 25 | * Component for displaying images and animations. 26 | * 27 | * @author Herbert Czymontek 28 | */ 29 | @SimpleComponent 30 | @SimpleObject 31 | // This permission needed because the picture URL could reference a contact photo 32 | @UsesPermissions(permissionNames = "android.permission.READ_CONTACTS") 33 | public interface Image extends VisibleComponent { 34 | 35 | /** 36 | * Picture property setter method. 37 | * 38 | * @param imagePath path and name of image 39 | */ 40 | @SimpleProperty(type = SimpleProperty.PROPERTY_TYPE_ASSET, 41 | initializer = "\"\"") 42 | void Picture(String imagePath); 43 | } 44 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/Label.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleComponent; 20 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 21 | 22 | /** 23 | * Label containing a text string or an image. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SimpleComponent 28 | @SimpleObject 29 | public interface Label extends TextComponent { 30 | } 31 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/Layout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * The Layout interface for Simple components. 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | @SimpleObject 27 | public interface Layout { 28 | } 29 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/LinearLayout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | import com.google.devtools.simple.runtime.annotations.SimpleProperty; 21 | 22 | /** 23 | * Linear layout for placing components horizontally or vertically. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SimpleObject 28 | public interface LinearLayout extends Layout { 29 | 30 | /** 31 | * Orientation property setter method. 32 | * 33 | * @param newOrientation {@link Component#LAYOUT_ORIENTATION_HORIZONTAL} or 34 | * {@link Component#LAYOUT_ORIENTATION_VERTICAL} 35 | */ 36 | @SimpleProperty 37 | void Orientation(int newOrientation); 38 | } 39 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/SensorComponent.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | 21 | /** 22 | * Marker interface for Simple sensor components. 23 | * 24 | * @author Herbert Czymontek 25 | */ 26 | @SimpleObject 27 | public interface SensorComponent extends Component { 28 | } 29 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/TableLayout.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components; 18 | 19 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 20 | import com.google.devtools.simple.runtime.annotations.SimpleProperty; 21 | 22 | /** 23 | * A layout component allowing subcomponents to be placed in tabular form. 24 | * 25 | * @author Herbert Czymontek 26 | */ 27 | @SimpleObject 28 | public interface TableLayout extends Layout { 29 | 30 | /** 31 | * Columns property setter method. 32 | * 33 | * @param cols number of columns in this layout 34 | */ 35 | @SimpleProperty 36 | void Columns(int cols); 37 | 38 | /** 39 | * Rows property setter method. 40 | * 41 | * @param rows number of rows in this layout 42 | */ 43 | @SimpleProperty 44 | void Rows(int rows); 45 | } 46 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/impl/android/FrameLayoutImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components.impl.android; 18 | 19 | import com.google.devtools.simple.runtime.android.ApplicationImpl; 20 | import com.google.devtools.simple.runtime.components.FrameLayout; 21 | 22 | /** 23 | * Frame layout for Simple components. 24 | * 25 | * @author David Foster 26 | */ 27 | public class FrameLayoutImpl extends LayoutImpl implements FrameLayout { 28 | 29 | /** 30 | * Creates a new frame layout. 31 | * 32 | * @param container view container 33 | */ 34 | FrameLayoutImpl(ViewComponentContainer container) { 35 | super(new android.widget.FrameLayout(ApplicationImpl.getContext()), container); 36 | } 37 | 38 | @Override 39 | public void addComponent(ViewComponent component) { 40 | getLayoutManager().addView(component.getView(), new android.widget.FrameLayout.LayoutParams( 41 | android.view.ViewGroup.LayoutParams.FILL_PARENT, 42 | android.view.ViewGroup.LayoutParams.FILL_PARENT)); 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/impl/android/LabelImpl.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components.impl.android; 18 | 19 | import com.google.devtools.simple.runtime.android.ApplicationImpl; 20 | import com.google.devtools.simple.runtime.components.ComponentContainer; 21 | import com.google.devtools.simple.runtime.components.Label; 22 | 23 | import android.view.View; 24 | import android.widget.TextView; 25 | 26 | /** 27 | * Label containing a text string or an image. 28 | * 29 | * @author Herbert Czymontek 30 | */ 31 | public final class LabelImpl extends TextViewComponent implements Label { 32 | 33 | /** 34 | * Creates a new Label component. 35 | * 36 | * @param container container which will hold the component (must not be 37 | * {@code null} 38 | */ 39 | public LabelImpl(ComponentContainer container) { 40 | super(container); 41 | } 42 | 43 | @Override 44 | protected View createView() { 45 | return new TextView(ApplicationImpl.getContext()); 46 | } 47 | } 48 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/components/impl/android/ViewComponentContainer.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.components.impl.android; 18 | 19 | import com.google.devtools.simple.runtime.components.ComponentContainer; 20 | 21 | import android.view.ViewGroup; 22 | 23 | /** 24 | * Components that can contain other components need to implement this 25 | * interface. 26 | * 27 | * @author Herbert Czymontek 28 | */ 29 | public interface ViewComponentContainer extends ComponentContainer { 30 | 31 | /** 32 | * Returns the layout manager of the container. 33 | * 34 | * @return layout manager 35 | */ 36 | ViewGroup getLayoutManager(); 37 | } 38 | -------------------------------------------------------------------------------- /XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/AssertionFailure.java: -------------------------------------------------------------------------------- 1 | /* 2 | * Copyright 2009 Google Inc. 3 | * 4 | * Licensed under the Apache License, Version 2.0 (the "License"); 5 | * you may not use this file except in compliance with the License. 6 | * You may obtain a copy of the License at 7 | * 8 | * http://www.apache.org/licenses/LICENSE-2.0 9 | * 10 | * Unless required by applicable law or agreed to in writing, software 11 | * distributed under the License is distributed on an "AS IS" BASIS, 12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 | * See the License for the specific language governing permissions and 14 | * limitations under the License. 15 | */ 16 | 17 | package com.google.devtools.simple.runtime.errors; 18 | 19 | import com.google.devtools.simple.runtime.Assertions; 20 | import com.google.devtools.simple.runtime.annotations.SimpleObject; 21 | 22 | /** 23 | * Runtime error indicating an assert failure. 24 | * 25 | *
Caused by the functions in {@link Assertions}.
26 | *
27 | * @author Herbert Czymontek
28 | */
29 | @SuppressWarnings("serial")
30 | @SimpleObject
31 | public final class AssertionFailure extends RuntimeError {
32 | }
33 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/ConversionError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.errors;
18 |
19 | import com.google.devtools.simple.runtime.annotations.SimpleObject;
20 |
21 | /**
22 | * Runtime error indicating a failed attempt of converting a value of a type
23 | * into a value of another type, e.g. the String "foo" into an Integer, but
24 | * also converting from a base type to a derived type where there is no
25 | * relationship.
26 | *
27 | * @author Herbert Czymontek
28 | */
29 | @SuppressWarnings("serial")
30 | @SimpleObject
31 | public final class ConversionError extends RuntimeError {
32 | }
33 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/FileAlreadyExistsError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.errors;
18 |
19 | import com.google.devtools.simple.runtime.annotations.SimpleObject;
20 |
21 | /**
22 | * Runtime error indicating that the attempt to create a file failed because
23 | * there is a file already existing with the same name.
24 | *
25 | * @author Herbert Czymontek
26 | */
27 | @SuppressWarnings("serial")
28 | @SimpleObject
29 | public final class FileAlreadyExistsError extends RuntimeError {
30 |
31 | /**
32 | * Creates a new error.
33 | *
34 | * @param message detailed message
35 | */
36 | public FileAlreadyExistsError(String message) {
37 | super(message);
38 | }
39 | }
40 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/FileIOError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.errors;
18 |
19 | import com.google.devtools.simple.runtime.annotations.SimpleObject;
20 |
21 | /**
22 | * Runtime error indicating a problem accessing a file.
23 | *
24 | * @author Herbert Czymontek
25 | */
26 | @SuppressWarnings("serial")
27 | @SimpleObject
28 | public final class FileIOError extends RuntimeError {
29 |
30 | /**
31 | * Creates a new File I/O error.
32 | *
33 | * @param message detailed message
34 | */
35 | public FileIOError(String message) {
36 | super(message);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/IllegalArgumentError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.errors;
18 |
19 | import com.google.devtools.simple.runtime.annotations.SimpleObject;
20 |
21 | /**
22 | * Runtime error indicating an illegal value for a function or procedure
23 | * argument.
24 | *
25 | * @author Herbert Czymontek
26 | */
27 | @SuppressWarnings("serial")
28 | @SimpleObject
29 | public final class IllegalArgumentError extends RuntimeError {
30 | }
31 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/IndexOutOfBoundsError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.errors;
18 |
19 | import com.google.devtools.simple.runtime.annotations.SimpleObject;
20 |
21 | /**
22 | * Runtime error indicating an array or collection access with an index that is
23 | * outside of the array or collection bounds.
24 | *
25 | * @author Herbert Czymontek
26 | */
27 | @SuppressWarnings("serial")
28 | @SimpleObject
29 | public final class IndexOutOfBoundsError extends RuntimeError {
30 | }
31 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/NoSuchFileError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.errors;
18 |
19 | import com.google.devtools.simple.runtime.annotations.SimpleObject;
20 |
21 | /**
22 | * Runtime error indicating that no file for the given name could be found.
23 | *
24 | * @author Herbert Czymontek
25 | */
26 | @SuppressWarnings("serial")
27 | @SimpleObject
28 | public final class NoSuchFileError extends RuntimeError {
29 |
30 | /**
31 | * Creates a new error.
32 | *
33 | * @param message detailed message
34 | */
35 | public NoSuchFileError(String message) {
36 | super(message);
37 | }
38 | }
39 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/PropertyAccessError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.errors;
18 |
19 | import com.google.devtools.simple.runtime.annotations.SimpleObject;
20 |
21 | /**
22 | * Indicates write access to a read-only property or read access to a
23 | * write-only property.
24 | *
25 | * @author Herbert Czymontek
26 | */
27 | @SuppressWarnings("serial")
28 | @SimpleObject
29 | public final class PropertyAccessError extends RuntimeError {
30 | }
31 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/UninitializedInstanceError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.errors;
18 |
19 | import com.google.devtools.simple.runtime.annotations.SimpleObject;
20 |
21 | /**
22 | * Runtime error indicating an access to an instance or array variable that
23 | * is not properly initialized.
24 | *
25 | * @author Herbert Czymontek
26 | */
27 | @SuppressWarnings("serial")
28 | @SimpleObject
29 | public final class UninitializedInstanceError extends RuntimeError {
30 | }
31 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/UnknownFileHandleError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.errors;
18 |
19 | import com.google.devtools.simple.runtime.annotations.SimpleObject;
20 |
21 | /**
22 | * Runtime error indicating an unknown file handle.
23 | *
24 | * @author Herbert Czymontek
25 | */
26 | @SuppressWarnings("serial")
27 | @SimpleObject
28 | public final class UnknownFileHandleError extends RuntimeError {
29 | }
30 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/errors/UnknownIdentifierError.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.errors;
18 |
19 | import com.google.devtools.simple.runtime.annotations.SimpleObject;
20 |
21 | /**
22 | * Indicates that an identifier could not be resolved at runtime.
23 | *
24 | * @author Herbert Czymontek
25 | */
26 | @SuppressWarnings("serial")
27 | @SimpleObject
28 | public final class UnknownIdentifierError extends RuntimeError {
29 | }
30 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/ByteReferenceParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.parameters;
18 |
19 | /**
20 | * Implementation of support class for Simple Byte reference parameters.
21 | *
22 | * @author Herbert Czymontek
23 | */
24 | public final class ByteReferenceParameter extends ReferenceParameter {
25 |
26 | // Value of referenced variable
27 | private byte value;
28 |
29 | /**
30 | * Creates a new Byte reference parameter.
31 | *
32 | * @param value initial value of reference
33 | */
34 | public ByteReferenceParameter(byte value) {
35 | set(value);
36 | }
37 |
38 | /**
39 | * Returns the current value of the reference.
40 | *
41 | * @return current value of reference parameter
42 | */
43 | public byte get() {
44 | return value;
45 | }
46 |
47 | /**
48 | * Changes the value of the reference.
49 | *
50 | * @param value new value of reference parameter
51 | */
52 | public void set(byte value) {
53 | this.value = value;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/DoubleReferenceParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.parameters;
18 |
19 | /**
20 | * Implementation of support class for Simple Double reference parameters.
21 | *
22 | * @author Herbert Czymontek
23 | */
24 | public final class DoubleReferenceParameter extends ReferenceParameter {
25 |
26 | // Value of referenced variable
27 | private double value;
28 |
29 | /**
30 | * Creates a new Double reference parameter.
31 | *
32 | * @param value initial value of reference
33 | */
34 | public DoubleReferenceParameter(double value) {
35 | set(value);
36 | }
37 |
38 | /**
39 | * Returns the current value of the reference.
40 | *
41 | * @return current value of reference parameter
42 | */
43 | public double get() {
44 | return value;
45 | }
46 |
47 | /**
48 | * Changes the value of the reference.
49 | *
50 | * @param value new value of reference parameter
51 | */
52 | public void set(double value) {
53 | this.value = value;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/IntegerReferenceParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.parameters;
18 |
19 | /**
20 | * Implementation of support class for Simple Integer reference parameters.
21 | *
22 | * @author Herbert Czymontek
23 | */
24 | public final class IntegerReferenceParameter extends ReferenceParameter {
25 |
26 | // Value of referenced variable
27 | private int value;
28 |
29 | /**
30 | * Creates a new Integer reference parameter.
31 | *
32 | * @param value initial value of reference
33 | */
34 | public IntegerReferenceParameter(int value) {
35 | set(value);
36 | }
37 |
38 | /**
39 | * Returns the current value of the reference.
40 | *
41 | * @return current value of reference parameter
42 | */
43 | public int get() {
44 | return value;
45 | }
46 |
47 | /**
48 | * Changes the value of the reference.
49 | *
50 | * @param value new value of reference parameter
51 | */
52 | public void set(int value) {
53 | this.value = value;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/LongReferenceParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.parameters;
18 |
19 | /**
20 | * Implementation of support class for Simple Long reference parameters.
21 | *
22 | * @author Herbert Czymontek
23 | */
24 | public final class LongReferenceParameter extends ReferenceParameter {
25 |
26 | // Value of referenced variable
27 | private long value;
28 |
29 | /**
30 | * Creates a new Long reference parameter.
31 | *
32 | * @param value initial value of reference
33 | */
34 | public LongReferenceParameter(long value) {
35 | set(value);
36 | }
37 |
38 | /**
39 | * Returns the current value of the reference.
40 | *
41 | * @return current value of reference parameter
42 | */
43 | public long get() {
44 | return value;
45 | }
46 |
47 | /**
48 | * Changes the value of the reference.
49 | *
50 | * @param value new value of reference parameter
51 | */
52 | public void set(long value) {
53 | this.value = value;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/ReferenceParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.parameters;
18 |
19 | /**
20 | * Superclass of all Simple reference parameters.
21 | *
22 | * @author Herbert Czymontek
23 | */
24 | public abstract class ReferenceParameter {
25 | }
26 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/ShortReferenceParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.parameters;
18 |
19 | /**
20 | * Implementation of support class for Simple Short reference parameters.
21 | *
22 | * @author Herbert Czymontek
23 | */
24 | public final class ShortReferenceParameter extends ReferenceParameter {
25 |
26 | // Value of referenced variable
27 | private short value;
28 |
29 | /**
30 | * Creates a new Short reference parameter.
31 | *
32 | * @param value initial value of reference
33 | */
34 | public ShortReferenceParameter(short value) {
35 | set(value);
36 | }
37 |
38 | /**
39 | * Returns the current value of the reference.
40 | *
41 | * @return current value of reference parameter
42 | */
43 | public short get() {
44 | return value;
45 | }
46 |
47 | /**
48 | * Changes the value of the reference.
49 | *
50 | * @param value new value of reference parameter
51 | */
52 | public void set(short value) {
53 | this.value = value;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/parameters/SingleReferenceParameter.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.parameters;
18 |
19 | /**
20 | * Implementation of support class for Simple Single reference parameters.
21 | *
22 | * @author Herbert Czymontek
23 | */
24 | public final class SingleReferenceParameter extends ReferenceParameter {
25 |
26 | // Value of referenced variable
27 | private float value;
28 |
29 | /**
30 | * Creates a new Single reference parameter.
31 | *
32 | * @param value initial value of reference
33 | */
34 | public SingleReferenceParameter(float value) {
35 | set(value);
36 | }
37 |
38 | /**
39 | * Returns the current value of the reference.
40 | *
41 | * @return current value of reference parameter
42 | */
43 | public float get() {
44 | return value;
45 | }
46 |
47 | /**
48 | * Changes the value of the reference.
49 | *
50 | * @param value new value of reference parameter
51 | */
52 | public void set(float value) {
53 | this.value = value;
54 | }
55 | }
56 |
--------------------------------------------------------------------------------
/XRunTime/src/main/java/com/google/devtools/simple/runtime/variants/UninitializedVariant.java:
--------------------------------------------------------------------------------
1 | /*
2 | * Copyright 2009 Google Inc.
3 | *
4 | * Licensed under the Apache License, Version 2.0 (the "License");
5 | * you may not use this file except in compliance with the License.
6 | * You may obtain a copy of the License at
7 | *
8 | * http://www.apache.org/licenses/LICENSE-2.0
9 | *
10 | * Unless required by applicable law or agreed to in writing, software
11 | * distributed under the License is distributed on an "AS IS" BASIS,
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 | * See the License for the specific language governing permissions and
14 | * limitations under the License.
15 | */
16 |
17 | package com.google.devtools.simple.runtime.variants;
18 |
19 | /**
20 | * Uninitialized variant implementation.
21 | *
22 | * @author Herbert Czymontek
23 | */
24 | public final class UninitializedVariant extends Variant {
25 |
26 | private static UninitializedVariant UNINITIALIZED_VARIANT = new UninitializedVariant();
27 |
28 | /**
29 | * Factory method for creating object variants.
30 | *
31 | * @return new uninitialized variant
32 | */
33 | public static final UninitializedVariant getUninitializedVariant() {
34 | return UNINITIALIZED_VARIANT;
35 | }
36 |
37 | /*
38 | * Creates a new uninitialized variant.
39 | */
40 | private UninitializedVariant() {
41 | super(VARIANT_UNINITIALIZED);
42 | }
43 | }
44 |
--------------------------------------------------------------------------------
/XRunTime/src/main/res/values/strings.xml:
--------------------------------------------------------------------------------
1 |