X-Git-Url: https://gerrit.simantics.org/r/gitweb?a=blobdiff_plain;f=bundles%2Forg.simantics.databoard%2Fsrc%2Forg%2Fsimantics%2Fdataboard%2Fbinding%2FBinding.java;h=22acacdc2ddcf8512b024a4bed3c75605fc3ed72;hb=refs%2Fchanges%2F10%2F1010%2F2;hp=6bc33f7b75199d86cdf5914560e9bc941466e3fe;hpb=969bd23cab98a79ca9101af33334000879fb60c5;p=simantics%2Fplatform.git
diff --git a/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/Binding.java b/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/Binding.java
index 6bc33f7b7..22acacdc2 100644
--- a/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/Binding.java
+++ b/bundles/org.simantics.databoard/src/org/simantics/databoard/binding/Binding.java
@@ -1,88 +1,88 @@
-/*******************************************************************************
- * Copyright (c) 2010 Association for Decentralized Information Management in
- * Industry THTH ry.
- * All rights reserved. This program and the accompanying materials
- * are made available under the terms of the Eclipse Public License v1.0
- * which accompanies this distribution, and is available at
- * http://www.eclipse.org/legal/epl-v10.html
- *
- * Contributors:
- * VTT Technical Research Centre of Finland - initial API and implementation
- *******************************************************************************/
+/*******************************************************************************
+ * Copyright (c) 2010 Association for Decentralized Information Management in
+ * Industry THTH ry.
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * VTT Technical Research Centre of Finland - initial API and implementation
+ *******************************************************************************/
package org.simantics.databoard.binding;
-import java.io.IOException;
-import java.io.Reader;
-import java.util.Comparator;
-import java.util.HashSet;
-import java.util.IdentityHashMap;
-import java.util.Random;
-import java.util.Set;
-
-import org.simantics.databoard.Bindings;
-import org.simantics.databoard.accessor.error.AccessorConstructionException;
-import org.simantics.databoard.accessor.error.AccessorException;
-import org.simantics.databoard.accessor.reference.ChildReference;
-import org.simantics.databoard.adapter.AdaptException;
-import org.simantics.databoard.adapter.AdapterConstructionException;
-import org.simantics.databoard.adapter.RuntimeAdaptException;
-import org.simantics.databoard.binding.error.BindingException;
-import org.simantics.databoard.binding.error.RuntimeBindingException;
-import org.simantics.databoard.binding.impl.BindingPrintContext;
-import org.simantics.databoard.binding.mutable.MutableVariant;
-import org.simantics.databoard.binding.mutable.Variant;
-import org.simantics.databoard.binding.util.DefaultValue;
-import org.simantics.databoard.binding.util.RandomValue;
-import org.simantics.databoard.parser.DataParser;
-import org.simantics.databoard.parser.DataValuePrinter;
-import org.simantics.databoard.parser.ParseException;
-import org.simantics.databoard.parser.PrintFormat;
-import org.simantics.databoard.parser.repository.DataTypeSyntaxError;
-import org.simantics.databoard.parser.repository.DataValueRepository;
-import org.simantics.databoard.serialization.RuntimeSerializerConstructionException;
-import org.simantics.databoard.serialization.Serializer;
-import org.simantics.databoard.serialization.SerializerFactory;
-import org.simantics.databoard.serialization.SerializerScheme;
-import org.simantics.databoard.type.Datatype;
-import org.simantics.databoard.util.IdentityPair;
+import java.io.IOException;
+import java.io.Reader;
+import java.util.Comparator;
+import java.util.HashSet;
+import java.util.IdentityHashMap;
+import java.util.Random;
+import java.util.Set;
-/**
- * This class represents connection between abstract datatype and java class.
- * A binding allows an access to an Object in scope of a datatype.
- *
- * For example, IntegerBinding gives unified access to any integer class
- * (Integer, int, MutableInteger, UnsignedInteger). There is same unification
- * for primitive types and constructed types (record, map, array, union, variant).
- *
- * You can get a hold of binding several ways:
- * 1) Use one of the default bindings e.g. {@link Bindings#BYTE_ARRAY}
- * 2) Create one using Datatype {@link Bindings#getMutableBinding(Datatype)}
- * 3) Create one using Reflectiong {@link Bindings#getBinding(Class)}
- * 4) Instantiate binding your self. e.g. new TreeMapBinding( Bindings.STRING, Bindings.STRING );
- * 5) Sub-class one of the abstract binding classes
- * @see BooleanBinding
- * @see ByteBinding
- * @see IntegerBinding
- * @see LongBinding
- * @see FloatBinding
- * @see DoubleBinding
- * @see StringBinding
- * @see RecordBinding
- * @see ArrayBinding
- * @see MapBinding
- * @see OptionalBinding
- * @see UnionBinding
- * @see VariantBinding
- *
- * See examples/BindingExample.java
- * @see Bindings Facade class Bindings provices extra functionality.
- * @author Toni Kalajainen
+import org.simantics.databoard.Bindings;
+import org.simantics.databoard.accessor.error.AccessorConstructionException;
+import org.simantics.databoard.accessor.error.AccessorException;
+import org.simantics.databoard.accessor.reference.ChildReference;
+import org.simantics.databoard.adapter.AdaptException;
+import org.simantics.databoard.adapter.AdapterConstructionException;
+import org.simantics.databoard.adapter.RuntimeAdaptException;
+import org.simantics.databoard.binding.error.BindingException;
+import org.simantics.databoard.binding.error.RuntimeBindingException;
+import org.simantics.databoard.binding.impl.BindingPrintContext;
+import org.simantics.databoard.binding.mutable.MutableVariant;
+import org.simantics.databoard.binding.mutable.Variant;
+import org.simantics.databoard.binding.util.DefaultValue;
+import org.simantics.databoard.binding.util.RandomValue;
+import org.simantics.databoard.parser.DataParser;
+import org.simantics.databoard.parser.DataValuePrinter;
+import org.simantics.databoard.parser.ParseException;
+import org.simantics.databoard.parser.PrintFormat;
+import org.simantics.databoard.parser.repository.DataTypeSyntaxError;
+import org.simantics.databoard.parser.repository.DataValueRepository;
+import org.simantics.databoard.serialization.RuntimeSerializerConstructionException;
+import org.simantics.databoard.serialization.Serializer;
+import org.simantics.databoard.serialization.SerializerFactory;
+import org.simantics.databoard.serialization.SerializerScheme;
+import org.simantics.databoard.type.Datatype;
+import org.simantics.databoard.util.IdentityPair;
+
+/**
+ * This class represents connection between abstract datatype and java class.
+ * A binding allows an access to an Object in scope of a datatype.
+ *
+ * For example, IntegerBinding gives unified access to any integer class
+ * (Integer, int, MutableInteger, UnsignedInteger). There is same unification
+ * for primitive types and constructed types (record, map, array, union, variant).
+ *
+ * You can get a hold of binding several ways:
+ * 1) Use one of the default bindings e.g. {@link Bindings#BYTE_ARRAY}
+ * 2) Create one using Datatype {@link Bindings#getMutableBinding(Datatype)}
+ * 3) Create one using Reflectiong {@link Bindings#getBinding(Class)}
+ * 4) Instantiate binding your self. e.g. new TreeMapBinding( Bindings.STRING, Bindings.STRING );
+ * 5) Sub-class one of the abstract binding classes
+ * @see BooleanBinding
+ * @see ByteBinding
+ * @see IntegerBinding
+ * @see LongBinding
+ * @see FloatBinding
+ * @see DoubleBinding
+ * @see StringBinding
+ * @see RecordBinding
+ * @see ArrayBinding
+ * @see MapBinding
+ * @see OptionalBinding
+ * @see UnionBinding
+ * @see VariantBinding
+ *
+ * See examples/BindingExample.java
+ * @see Bindings Facade class Bindings provices extra functionality.
+ * @author Toni Kalajainen
* @author Hannu Niemisto
*/
public abstract class Binding implements Comparator