From: <iro...@us...> - 2009-08-15 16:04:38
|
Revision: 125 http://pojomatic.svn.sourceforge.net/pojomatic/?rev=125&view=rev Author: iroberts Date: 2009-08-15 16:04:29 +0000 (Sat, 15 Aug 2009) Log Message: ----------- move factory method up top Modified Paths: -------------- trunk/Pojomatic/src/main/java/org/pojomatic/internal/ClassProperties.java Modified: trunk/Pojomatic/src/main/java/org/pojomatic/internal/ClassProperties.java =================================================================== --- trunk/Pojomatic/src/main/java/org/pojomatic/internal/ClassProperties.java 2009-08-15 16:03:32 UTC (rev 124) +++ trunk/Pojomatic/src/main/java/org/pojomatic/internal/ClassProperties.java 2009-08-15 16:04:29 UTC (rev 125) @@ -22,6 +22,20 @@ * {@link PojomatorImpl#doEquals(Object, Object)}, and {@link PojomatorImpl#doToString(Object)}. */ public class ClassProperties { + /** + * Creates a new instance. + * + * @param <T> the type of {@code pojoClass} + * @param pojoClass the class to inspect + * @return a new instance + * @throws IllegalArgumentException if {@code pojoClass} has no properties annotated for use + * with Pojomatic. + */ + public static <T> ClassProperties createInstance(Class<T> pojoClass) throws IllegalArgumentException { + return new ClassProperties(pojoClass); + } + + private static final Pattern ACCESSOR_PATTERN = Pattern.compile("(get|is)\\P{Ll}.*"); private final Map<PropertyRole, Collection<PropertyElement>> properties = makeProperties(); @@ -157,17 +171,4 @@ } return properties; } - - /** - * Creates a new instance. - * - * @param <T> the type of {@code pojoClass} - * @param pojoClass the class to inspect - * @return a new instance - * @throws IllegalArgumentException if {@code pojoClass} has no properties annotated for use - * with Pojomatic. - */ - public static <T> ClassProperties createInstance(Class<T> pojoClass) throws IllegalArgumentException { - return new ClassProperties(pojoClass); - } } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |