Author: steve.ebersole(a)jboss.com
Date: 2008-10-28 14:43:14 -0400 (Tue, 28 Oct 2008)
New Revision: 15416
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/AssertionFailure.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/Version.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationDescriptor.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationFactory.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationProxy.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/AnnotationReader.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/Filter.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/ReflectionManager.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/ReflectionUtil.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XAnnotatedElement.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XClass.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XMember.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XMethod.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XPackage.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XProperty.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaAnnotationReader.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaReflectionManager.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXAnnotatedElement.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXArrayType.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXClass.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXCollectionType.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXMember.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXMethod.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXPackage.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXProperty.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXSimpleType.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXType.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/Pair.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/ApproximatingTypeEnvironment.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/CompoundTypeEnvironment.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/IdentityTypeEnvironment.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/SimpleTypeEnvironment.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeEnvironment.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeEnvironmentFactory.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeFactory.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeSwitch.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeUtils.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/util/ReflectHelper.java
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/util/StringHelper.java
core/trunk/core/src/main/java/org/hibernate/util/StringHelper.java
Log:
HHH-3549 : import commons-annotations into core
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/AssertionFailure.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/AssertionFailure.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/AssertionFailure.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,4 +1,26 @@
-//$Id: $
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common;
import org.slf4j.LoggerFactory;
@@ -7,11 +29,12 @@
/**
* Indicates failure of an assertion: a possible bug in Hibernate.
+ * <p/>
+ * TODO : Copy from Hibernate Core, do some mutualization here?
*
* @author Gavin King
* @auhor Emmanuel Bernard
*/
-//TODO Copy from Hibernate Core, do some mutualization here?
public class AssertionFailure extends RuntimeException {
private static final Logger log = LoggerFactory.getLogger(AssertionFailure.class);
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/Version.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/Version.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/Version.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common;
import org.slf4j.Logger;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationDescriptor.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationDescriptor.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationDescriptor.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.annotationfactory;
import java.lang.annotation.Annotation;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationFactory.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationFactory.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationFactory.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.annotationfactory;
import java.lang.annotation.Annotation;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationProxy.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationProxy.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/annotationfactory/AnnotationProxy.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.annotationfactory;
import java.lang.annotation.Annotation;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/AnnotationReader.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/AnnotationReader.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/AnnotationReader.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection;
import java.lang.annotation.Annotation;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/Filter.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/Filter.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/Filter.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,4 +1,26 @@
-//$Id$
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection;
/**
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/ReflectionManager.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/ReflectionManager.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/ReflectionManager.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection;
import java.lang.reflect.AnnotatedElement;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/ReflectionUtil.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/ReflectionUtil.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/ReflectionUtil.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection;
import java.lang.reflect.Field;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XAnnotatedElement.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XAnnotatedElement.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XAnnotatedElement.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection;
import java.lang.annotation.Annotation;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XClass.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XClass.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XClass.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection;
import java.util.List;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XMember.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XMember.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XMember.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,4 +1,26 @@
-//$Id$
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection;
import java.util.Collection;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XMethod.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XMethod.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XMethod.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,4 +1,26 @@
-//$Id$
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection;
/**
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XPackage.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XPackage.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XPackage.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection;
/**
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XProperty.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XProperty.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/XProperty.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection;
/**
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaAnnotationReader.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaAnnotationReader.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaAnnotationReader.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java;
import java.lang.annotation.Annotation;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaReflectionManager.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaReflectionManager.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaReflectionManager.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java;
import java.lang.reflect.AnnotatedElement;
@@ -19,7 +42,7 @@
import org.hibernate.annotations.common.reflection.java.generics.TypeEnvironmentFactory;
import org.hibernate.annotations.common.reflection.java.generics.TypeSwitch;
import org.hibernate.annotations.common.reflection.java.generics.TypeUtils;
-import org.hibernate.annotations.common.util.ReflectHelper;
+import org.hibernate.util.ReflectHelper;
import org.hibernate.annotations.common.Version;
/**
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXAnnotatedElement.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXAnnotatedElement.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXAnnotatedElement.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java;
import java.lang.annotation.Annotation;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXArrayType.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXArrayType.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXArrayType.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java;
import java.lang.reflect.Array;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXClass.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXClass.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXClass.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java;
import java.lang.reflect.Field;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXCollectionType.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXCollectionType.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXCollectionType.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,4 +1,28 @@
-// $Id:$
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+
+// $Id$
package org.hibernate.annotations.common.reflection.java;
import java.lang.reflect.ParameterizedType;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXMember.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXMember.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXMember.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,27 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+
//$Id$
package org.hibernate.annotations.common.reflection.java;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXMethod.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXMethod.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXMethod.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,27 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+
//$Id$
package org.hibernate.annotations.common.reflection.java;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXPackage.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXPackage.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXPackage.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java;
import org.hibernate.annotations.common.reflection.XPackage;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXProperty.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXProperty.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXProperty.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java;
import java.beans.Introspector;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXSimpleType.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXSimpleType.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXSimpleType.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java;
import java.lang.reflect.Type;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXType.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXType.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/JavaXType.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,27 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
+
//$Id: PropertyTypeExtractor.java 9316 2006-02-22 20:47:31Z epbernard $
package org.hibernate.annotations.common.reflection.java;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/Pair.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/Pair.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/Pair.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java;
/**
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/ApproximatingTypeEnvironment.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/ApproximatingTypeEnvironment.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/ApproximatingTypeEnvironment.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java.generics;
import java.lang.reflect.Array;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/CompoundTypeEnvironment.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/CompoundTypeEnvironment.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/CompoundTypeEnvironment.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java.generics;
import java.lang.reflect.Type;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/IdentityTypeEnvironment.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/IdentityTypeEnvironment.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/IdentityTypeEnvironment.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java.generics;
import java.lang.reflect.Type;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/SimpleTypeEnvironment.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/SimpleTypeEnvironment.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/SimpleTypeEnvironment.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java.generics;
import java.lang.reflect.GenericArrayType;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeEnvironment.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeEnvironment.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeEnvironment.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java.generics;
import java.lang.reflect.Type;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeEnvironmentFactory.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeEnvironmentFactory.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeEnvironmentFactory.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java.generics;
import java.lang.reflect.ParameterizedType;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeFactory.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeFactory.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeFactory.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java.generics;
import java.lang.reflect.Array;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeSwitch.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeSwitch.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeSwitch.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java.generics;
import java.lang.reflect.GenericArrayType;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeUtils.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeUtils.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/reflection/java/generics/TypeUtils.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,3 +1,26 @@
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.reflection.java.generics;
import java.lang.reflect.GenericArrayType;
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/util/ReflectHelper.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/util/ReflectHelper.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/util/ReflectHelper.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,122 +1,79 @@
-//$Id: $
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.util;
import java.lang.reflect.Method;
import java.lang.reflect.Member;
-import java.lang.reflect.Modifier;
-import org.hibernate.annotations.common.AssertionFailure;
-
/**
+ * Complete duplication of {@link org.hibernate.util.ReflectHelper}.
+ *
* @author Emmanuel Bernard
+ * @deprecated Use {@link org.hibernate.util.ReflectHelper} instead.
*/
-
public final class ReflectHelper {
-
- private static final Class[] OBJECT = new Class[] { Object.class };
- private static final Method OBJECT_EQUALS;
- private static final Class[] NO_PARAM = new Class[] { };
-
- private static final Method OBJECT_HASHCODE;
- static {
- Method eq;
- Method hash;
- try {
- eq = Object.class.getMethod("equals", OBJECT);
- hash = Object.class.getMethod("hashCode", NO_PARAM);
- }
- catch (Exception e) {
- throw new AssertionFailure("Could not find Object.equals() or
Object.hashCode()", e);
- }
- OBJECT_EQUALS = eq;
- OBJECT_HASHCODE = hash;
- }
-
public static boolean overridesEquals(Class clazz) {
- Method equals;
- try {
- equals = clazz.getMethod("equals", OBJECT);
- }
- catch (NoSuchMethodException nsme) {
- return false; //its an interface so we can't really tell anything...
- }
- return !OBJECT_EQUALS.equals(equals);
+ return org.hibernate.util.ReflectHelper.overridesEquals( clazz );
}
public static boolean overridesHashCode(Class clazz) {
- Method hashCode;
- try {
- hashCode = clazz.getMethod("hashCode", NO_PARAM);
- }
- catch (NoSuchMethodException nsme) {
- return false; //its an interface so we can't really tell anything...
- }
- return !OBJECT_HASHCODE.equals(hashCode);
+ return org.hibernate.util.ReflectHelper.overridesHashCode( clazz );
}
public static Class classForName(String name) throws ClassNotFoundException {
- try {
- ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
- if ( contextClassLoader != null ) {
- return contextClassLoader.loadClass(name);
- }
- }
- catch ( Throwable t ) {
- }
- return Class.forName( name );
+ return org.hibernate.util.ReflectHelper.classForName( name );
}
public static Class classForName(String name, Class caller) throws
ClassNotFoundException {
- try {
- ClassLoader contextClassLoader = Thread.currentThread().getContextClassLoader();
- if ( contextClassLoader != null ) {
- return contextClassLoader.loadClass( name );
- }
- }
- catch ( Throwable e ) {
- }
- return Class.forName( name, true, caller.getClassLoader() );
+ return org.hibernate.util.ReflectHelper.classForName( name, caller );
}
public static boolean isPublic(Class clazz, Member member) {
- return Modifier.isPublic( member.getModifiers() ) && Modifier.isPublic(
clazz.getModifiers() );
+ return org.hibernate.util.ReflectHelper.isPublic( clazz, member );
}
public static Object getConstantValue(String name) {
- Class clazz;
- try {
- clazz = classForName( StringHelper.qualifier( name ) );
- }
- catch ( Throwable t ) {
- return null;
- }
- try {
- return clazz.getField( StringHelper.unqualify( name ) ).get(null);
- }
- catch ( Throwable t ) {
- return null;
- }
+ return org.hibernate.util.ReflectHelper.getConstantValue( name );
}
public static boolean isAbstractClass(Class clazz) {
- int modifier = clazz.getModifiers();
- return Modifier.isAbstract(modifier) || Modifier.isInterface(modifier);
+ return org.hibernate.util.ReflectHelper.isAbstractClass( clazz );
}
public static boolean isFinalClass(Class clazz) {
- return Modifier.isFinal( clazz.getModifiers() );
+ return org.hibernate.util.ReflectHelper.isFinalClass( clazz );
}
public static Method getMethod(Class clazz, Method method) {
- try {
- return clazz.getMethod( method.getName(), method.getParameterTypes() );
- }
- catch (Exception e) {
- return null;
- }
+ return org.hibernate.util.ReflectHelper.getMethod( clazz, method );
}
- private ReflectHelper() {}
+ /**
+ * Direct instantiation of ReflectHelper disallowed.
+ */
+ private ReflectHelper() {
+ }
}
Modified:
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/util/StringHelper.java
===================================================================
---
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/util/StringHelper.java 2008-10-28
18:41:10 UTC (rev 15415)
+++
core/trunk/commons-annotations/src/main/java/org/hibernate/annotations/common/util/StringHelper.java 2008-10-28
18:43:14 UTC (rev 15416)
@@ -1,421 +1,198 @@
-//$Id: $
+/*
+ * Hibernate, Relational Persistence for Idiomatic Java
+ *
+ * Copyright (c) 2008, Red Hat Middleware LLC or third-party contributors as
+ * indicated by the @author tags or express copyright attribution
+ * statements applied by the authors. All third-party contributions are
+ * distributed under license by Red Hat Middleware LLC.
+ *
+ * This copyrighted material is made available to anyone wishing to use, modify,
+ * copy, or redistribute it subject to the terms and conditions of the GNU
+ * Lesser General Public License, as published by the Free Software Foundation.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public License
+ * along with this distribution; if not, write to:
+ * Free Software Foundation, Inc.
+ * 51 Franklin Street, Fifth Floor
+ * Boston, MA 02110-1301 USA
+ */
package org.hibernate.annotations.common.util;
import java.util.Iterator;
-import java.util.StringTokenizer;
-import java.util.ArrayList;
import java.util.Collection;
/**
+ * Complete duplication of {@link org.hibernate.util.StringHelper}.
+ *
* @author Emmanuel Bernard
+ * @deprecated Use {@link org.hibernate.util.StringHelper} instead.
*/
-//TODO copy from Hibernate Core, mutualization?
public final class StringHelper {
private static final int ALIAS_TRUNCATE_LENGTH = 10;
public static final String WHITESPACE = " \n\r\f\t";
- private StringHelper() { /* static methods only - hide constructor */
+ private StringHelper() {
}
public static int lastIndexOfLetter(String string) {
- for ( int i=0; i<string.length(); i++ ) {
- char character = string.charAt(i);
- if ( !Character.isLetter(character) ) return i-1;
- }
- return string.length()-1;
+ return org.hibernate.util.StringHelper.lastIndexOfLetter( string );
}
public static String join(String seperator, String[] strings) {
- int length = strings.length;
- if ( length == 0 ) return "";
- StringBuffer buf = new StringBuffer( length * strings[0].length() )
- .append( strings[0] );
- for ( int i = 1; i < length; i++ ) {
- buf.append( seperator ).append( strings[i] );
- }
- return buf.toString();
+ return org.hibernate.util.StringHelper.join( seperator, strings );
}
public static String join(String seperator, Iterator objects) {
- StringBuffer buf = new StringBuffer();
- if ( objects.hasNext() ) buf.append( objects.next() );
- while ( objects.hasNext() ) {
- buf.append( seperator ).append( objects.next() );
- }
- return buf.toString();
+ return org.hibernate.util.StringHelper.join( seperator, objects );
}
public static String[] add(String[] x, String sep, String[] y) {
- String[] result = new String[x.length];
- for ( int i = 0; i < x.length; i++ ) {
- result[i] = x[i] + sep + y[i];
- }
- return result;
+ return org.hibernate.util.StringHelper.add( x, sep, y );
}
public static String repeat(String string, int times) {
- StringBuffer buf = new StringBuffer( string.length() * times );
- for ( int i = 0; i < times; i++ ) buf.append( string );
- return buf.toString();
+ return org.hibernate.util.StringHelper.repeat( string, times );
}
public static String replace(String template, String placeholder, String replacement) {
- return replace( template, placeholder, replacement, false );
+ return org.hibernate.util.StringHelper.replace( template, placeholder, replacement );
}
public static String[] replace(String templates[], String placeholder, String
replacement) {
- String[] result = new String[templates.length];
- for ( int i =0; i<templates.length; i++ ) {
- result[i] = replace( templates[i], placeholder, replacement );
- }
- return result;
+ return org.hibernate.util.StringHelper.replace( templates, placeholder, replacement );
}
public static String replace(String template, String placeholder, String replacement,
boolean wholeWords) {
- int loc = template == null ? -1 : template.indexOf( placeholder );
- if ( loc < 0 ) {
- return template;
- }
- else {
- final boolean actuallyReplace = !wholeWords ||
- loc + placeholder.length() == template.length() ||
- !Character.isJavaIdentifierPart( template.charAt( loc + placeholder.length() ) );
- String actualReplacement = actuallyReplace ? replacement : placeholder;
- return new StringBuffer( template.substring( 0, loc ) )
- .append( actualReplacement )
- .append( replace( template.substring( loc + placeholder.length() ),
- placeholder,
- replacement,
- wholeWords ) ).toString();
- }
+ return org.hibernate.util.StringHelper.replace( template, placeholder, replacement,
wholeWords );
}
-
public static String replaceOnce(String template, String placeholder, String
replacement) {
- int loc = template == null ? -1 : template.indexOf( placeholder );
- if ( loc < 0 ) {
- return template;
- }
- else {
- return new StringBuffer( template.substring( 0, loc ) )
- .append( replacement )
- .append( template.substring( loc + placeholder.length() ) )
- .toString();
- }
+ return org.hibernate.util.StringHelper.replaceOnce( template, placeholder, replacement
);
}
public static String[] split(String seperators, String list) {
- return split( seperators, list, false );
+ return org.hibernate.util.StringHelper.split( seperators, list );
}
public static String[] split(String seperators, String list, boolean include) {
- StringTokenizer tokens = new StringTokenizer( list, seperators, include );
- String[] result = new String[ tokens.countTokens() ];
- int i = 0;
- while ( tokens.hasMoreTokens() ) {
- result[i++] = tokens.nextToken();
- }
- return result;
+ return org.hibernate.util.StringHelper.split( seperators, list, include );
}
public static String unqualify(String qualifiedName) {
- int loc = qualifiedName.lastIndexOf(".");
- return ( loc < 0 ) ? qualifiedName : qualifiedName.substring(
qualifiedName.lastIndexOf(".") + 1 );
+ return org.hibernate.util.StringHelper.unqualify( qualifiedName );
}
- public static String qualifier(String qualifiedName) {
- int loc = qualifiedName.lastIndexOf(".");
- return ( loc < 0 ) ? "" : qualifiedName.substring( 0, loc );
+ public static String qualify(String prefix, String name) {
+ return org.hibernate.util.StringHelper.qualify( prefix, name );
}
- public static String[] suffix(String[] columns, String suffix) {
- if ( suffix == null ) return columns;
- String[] qualified = new String[columns.length];
- for ( int i = 0; i < columns.length; i++ ) {
- qualified[i] = suffix( columns[i], suffix );
- }
- return qualified;
+ public static String[] qualify(String prefix, String[] names) {
+ return org.hibernate.util.StringHelper.qualify( prefix, names );
}
- private static String suffix(String name, String suffix) {
- return ( suffix == null ) ? name : name + suffix;
+ public static String qualifier(String qualifiedName) {
+ return org.hibernate.util.StringHelper.qualifier( qualifiedName );
}
+ public static String[] suffix(String[] columns, String suffix) {
+ return org.hibernate.util.StringHelper.suffix( columns, suffix );
+ }
+
public static String root(String qualifiedName) {
- int loc = qualifiedName.indexOf( "." );
- return ( loc < 0 ) ? qualifiedName : qualifiedName.substring( 0, loc );
+ return org.hibernate.util.StringHelper.root( qualifiedName );
}
public static String unroot(String qualifiedName) {
- int loc = qualifiedName.indexOf( "." );
- return ( loc < 0 ) ? qualifiedName : qualifiedName.substring( loc+1,
qualifiedName.length() );
+ return org.hibernate.util.StringHelper.unroot( qualifiedName );
}
public static boolean booleanValue(String tfString) {
- String trimmed = tfString.trim().toLowerCase();
- return trimmed.equals( "true" ) || trimmed.equals( "t" );
+ return org.hibernate.util.StringHelper.booleanValue( tfString );
}
public static String toString(Object[] array) {
- int len = array.length;
- if ( len == 0 ) return "";
- StringBuffer buf = new StringBuffer( len * 12 );
- for ( int i = 0; i < len - 1; i++ ) {
- buf.append( array[i] ).append(", ");
- }
- return buf.append( array[len - 1] ).toString();
+ return org.hibernate.util.StringHelper.toString( array );
}
public static String[] multiply(String string, Iterator placeholders, Iterator
replacements) {
- String[] result = new String[]{string};
- while ( placeholders.hasNext() ) {
- result = multiply( result, ( String ) placeholders.next(), ( String[] )
replacements.next() );
- }
- return result;
+ return org.hibernate.util.StringHelper.multiply( string, placeholders, replacements );
}
- private static String[] multiply(String[] strings, String placeholder, String[]
replacements) {
- String[] results = new String[replacements.length * strings.length];
- int n = 0;
- for ( int i = 0; i < replacements.length; i++ ) {
- for ( int j = 0; j < strings.length; j++ ) {
- results[n++] = replaceOnce( strings[j], placeholder, replacements[i] );
- }
- }
- return results;
- }
-
public static int countUnquoted(String string, char character) {
- if ( '\'' == character ) {
- throw new IllegalArgumentException( "Unquoted count of quotes is invalid"
);
- }
- if (string == null)
- return 0;
- // Impl note: takes advantage of the fact that an escpaed single quote
- // embedded within a quote-block can really be handled as two seperate
- // quote-blocks for the purposes of this method...
- int count = 0;
- int stringLength = string.length();
- boolean inQuote = false;
- for ( int indx = 0; indx < stringLength; indx++ ) {
- char c = string.charAt( indx );
- if ( inQuote ) {
- if ( '\'' == c ) {
- inQuote = false;
- }
- }
- else if ( '\'' == c ) {
- inQuote = true;
- }
- else if ( c == character ) {
- count++;
- }
- }
- return count;
+ return org.hibernate.util.StringHelper.countUnquoted( string, character );
}
public static int[] locateUnquoted(String string, char character) {
- if ( '\'' == character ) {
- throw new IllegalArgumentException( "Unquoted count of quotes is invalid"
);
- }
- if (string == null) {
- return new int[0];
- }
-
- ArrayList locations = new ArrayList( 20 );
-
- // Impl note: takes advantage of the fact that an escaped single quote
- // embedded within a quote-block can really be handled as two separate
- // quote-blocks for the purposes of this method...
- int stringLength = string.length();
- boolean inQuote = false;
- for ( int indx = 0; indx < stringLength; indx++ ) {
- char c = string.charAt( indx );
- if ( inQuote ) {
- if ( '\'' == c ) {
- inQuote = false;
- }
- }
- else if ( '\'' == c ) {
- inQuote = true;
- }
- else if ( c == character ) {
- locations.add( new Integer( indx ) );
- }
- }
- return toIntArray( locations );
+ return org.hibernate.util.StringHelper.locateUnquoted( string, character );
}
public static boolean isNotEmpty(String string) {
- return string != null && string.length() > 0;
+ return org.hibernate.util.StringHelper.isNotEmpty( string );
}
public static boolean isEmpty(String string) {
- return string == null || string.length() == 0;
+ return org.hibernate.util.StringHelper.isEmpty( string );
}
- public static String qualify(String prefix, String name) {
- if ( name == null || prefix == null ) {
- throw new NullPointerException();
- }
- return new StringBuffer( prefix.length() + name.length() + 1 )
- .append(prefix)
- .append('.')
- .append(name)
- .toString();
- }
-
- public static String[] qualify(String prefix, String[] names) {
- if ( prefix == null ) return names;
- int len = names.length;
- String[] qualified = new String[len];
- for ( int i = 0; i < len; i++ ) {
- qualified[i] = qualify( prefix, names[i] );
- }
- return qualified;
- }
-
public static int firstIndexOfChar(String sqlString, String string, int startindex) {
- int matchAt = -1;
- for ( int i = 0; i < string.length(); i++ ) {
- int curMatch = sqlString.indexOf( string.charAt( i ), startindex );
- if ( curMatch >= 0 ) {
- if ( matchAt == -1 ) { // first time we find match!
- matchAt = curMatch;
- }
- else {
- matchAt = Math.min( matchAt, curMatch );
- }
- }
- }
- return matchAt;
+ return org.hibernate.util.StringHelper.firstIndexOfChar( sqlString, string, startindex
);
}
public static String truncate(String string, int length) {
- if ( string.length() <= length ) {
- return string;
- }
- else {
- return string.substring( 0, length );
- }
+ return org.hibernate.util.StringHelper.truncate( string, length );
}
public static String generateAlias(String description) {
- return generateAliasRoot(description) + '_';
+ return org.hibernate.util.StringHelper.generateAlias( description );
}
- /**
- * Generate a nice alias for the given class name or collection role
- * name and unique integer. Subclasses of Loader do <em>not</em> have
- * to use aliases of this form.
- * @return an alias of the form <tt>foo1_</tt>
- */
public static String generateAlias(String description, int unique) {
- return generateAliasRoot(description) +
- Integer.toString(unique) +
- '_';
+ return org.hibernate.util.StringHelper.generateAlias( description, unique );
}
- /**
- * Generates a root alias by truncating the "root name" defined by
- * the incoming description and removing/modifying any non-valid
- * alias characters.
- *
- * @param description The root name from which to generate a root alias.
- * @return The generated root alias.
- */
- private static String generateAliasRoot(String description) {
- String result = truncate( unqualifyEntityName(description), ALIAS_TRUNCATE_LENGTH )
- .toLowerCase()
- .replace( '/', '_' ) // entityNames may now include slashes for
the representations
- .replace( '$', '_' ); //classname may be an inner class
- result = cleanAlias( result );
- if ( Character.isDigit( result.charAt(result.length()-1) ) ) {
- return result + "x"; //ick!
- }
- else {
- return result;
- }
- }
-
- /**
- * Clean the generated alias by removing any non-alpha characters from the
- * beginning.
- *
- * @param alias The generated alias to be cleaned.
- * @return The cleaned alias, stripped of any leading non-alpha characters.
- */
- private static String cleanAlias(String alias) {
- char[] chars = alias.toCharArray();
- // short cut check...
- if ( !Character.isLetter( chars[0] ) ) {
- for ( int i = 1; i < chars.length; i++ ) {
- // as soon as we encounter our first letter, return the substring
- // from that position
- if ( Character.isLetter( chars[i] ) ) {
- return alias.substring( i );
- }
- }
- }
- return alias;
- }
-
public static String unqualifyEntityName(String entityName) {
- String result = unqualify(entityName);
- int slashPos = result.indexOf( '/' );
- if ( slashPos > 0 ) {
- result = result.substring( 0, slashPos - 1 );
- }
- return result;
+ return org.hibernate.util.StringHelper.unqualifyEntityName( entityName );
}
public static String toUpperCase(String str) {
- return str==null ? null : str.toUpperCase();
+ return org.hibernate.util.StringHelper.toUpperCase( str );
}
public static String toLowerCase(String str) {
- return str==null ? null : str.toLowerCase();
+ return org.hibernate.util.StringHelper.toLowerCase( str );
}
public static String moveAndToBeginning(String filter) {
- if ( filter.trim().length()>0 ){
- filter += " and ";
- if ( filter.startsWith(" and ") ) filter = filter.substring(4);
- }
- return filter;
+ return org.hibernate.util.StringHelper.moveAndToBeginning( filter );
}
- //TODO Copy from ArrayHelper in Hibernate Core
+ /**
+ * Not a direct copy from {@link org.hibernate.util.StringHelper}, this is instead
directly copied
+ * from {@link org.hibernate.util.ArrayHelper}.
+ *
+ * @param coll the collection
+ * @return The int array
+ * @deprecated Use {@link org.hibernate.util.ArrayHelper#toIntArray} instead.
+ */
public static int[] toIntArray(Collection coll) {
- Iterator iter = coll.iterator();
- int[] arr = new int[ coll.size() ];
- int i=0;
- while( iter.hasNext() ) {
- arr[i++] = ( (Integer) iter.next() ).intValue();
- }
- return arr;
+ return org.hibernate.util.ArrayHelper.toIntArray( coll );
}
public static boolean isQuoted(String name) {
- return name != null && name.length() != 0 && name.charAt( 0 ) ==
'`';
+ return org.hibernate.util.StringHelper.isQuoted( name );
}
public static String quote(String name) {
- if ( name == null || name.length() == 0 || isQuoted( name ) ) {
- return name;
- }
- else {
- return new StringBuilder( name.length() + 2 ).append('`').append( name
).append( '`' ).toString();
- }
+ return org.hibernate.util.StringHelper.quote( name );
}
public static String unquote(String name) {
- if ( isQuoted( name ) ) {
- return name.substring( 1, name.length() - 1 );
- }
- else {
- return name;
- }
+ return org.hibernate.util.StringHelper.unquote( name );
}
}
\ No newline at end of file
Modified: core/trunk/core/src/main/java/org/hibernate/util/StringHelper.java
===================================================================
--- core/trunk/core/src/main/java/org/hibernate/util/StringHelper.java 2008-10-28 18:41:10
UTC (rev 15415)
+++ core/trunk/core/src/main/java/org/hibernate/util/StringHelper.java 2008-10-28 18:43:14
UTC (rev 15416)
@@ -412,5 +412,45 @@
}
return filter;
}
-
+
+ /**
+ * Determine if the given string is quoted (wrapped by '`' characters at
beginning and end).
+ *
+ * @param name The name to check.
+ * @return True if the given string starts and ends with '`'; false otherwise.
+ */
+ public static boolean isQuoted(String name) {
+ return name != null && name.length() != 0 && name.charAt( 0 ) ==
'`' && name.charAt( name.length() - 1 ) == '`';
+ }
+
+ /**
+ * Return a representation of the given name ensuring quoting (wrapped with '`'
characters). If already wrapped
+ * return name.
+ *
+ * @param name The name to quote.
+ * @return The quoted version.
+ */
+ public static String quote(String name) {
+ if ( name == null || name.length() == 0 || isQuoted( name ) ) {
+ return name;
+ }
+ else {
+ return new StringBuilder( name.length() + 2 ).append('`').append( name
).append( '`' ).toString();
+ }
+ }
+
+ /**
+ * Return the unquoted version of name (stripping the start and end '`'
chanracters if present).
+ *
+ * @param name The name to be unquoted.
+ * @return The unquoted version.
+ */
+ public static String unquote(String name) {
+ if ( isQuoted( name ) ) {
+ return name.substring( 1, name.length() - 1 );
+ }
+ else {
+ return name;
+ }
+ }
}