[hibernate-commits] Hibernate SVN: r15906 - in validator/trunk/tck-utils: src/main/java/org/hibernate/tck and 1 other directories.

hibernate-commits at lists.jboss.org hibernate-commits at lists.jboss.org
Thu Feb 5 12:41:58 EST 2009


Author: pete.muir at jboss.org
Date: 2009-02-05 12:41:58 -0500 (Thu, 05 Feb 2009)
New Revision: 15906

Added:
   validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/
   validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/AuditAssertion.java
   validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/AuditParser.java
   validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessor.java
   validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessorFactory.java
   validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageReport.java
   validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/SpecReference.java
Modified:
   validator/trunk/tck-utils/pom.xml
Log:
Add Shane's xml audit code, change to Java6 build

Modified: validator/trunk/tck-utils/pom.xml
===================================================================
--- validator/trunk/tck-utils/pom.xml	2009-02-05 17:39:20 UTC (rev 15905)
+++ validator/trunk/tck-utils/pom.xml	2009-02-05 17:41:58 UTC (rev 15906)
@@ -115,8 +115,8 @@
                     <artifactId>maven-compiler-plugin</artifactId>
                     <version>2.0.2</version>
                     <configuration>
-                        <source>1.5</source>
-                        <target>1.5</target>
+                        <source>1.6</source>
+                        <target>1.6</target>
                     </configuration>
                 </plugin>
                 <plugin>

Added: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/AuditAssertion.java
===================================================================
--- validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/AuditAssertion.java	                        (rev 0)
+++ validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/AuditAssertion.java	2009-02-05 17:41:58 UTC (rev 15906)
@@ -0,0 +1,51 @@
+package org.hibernate.tck.report;
+
+/**
+ * Represents a single assertion as defined in the audit xml 
+ * 
+ * @author Shane Bryzak
+ *
+ */
+public class AuditAssertion implements Comparable<AuditAssertion>
+{
+   private String section;
+   private String id;
+   private String text;
+   private String note;
+   
+   public AuditAssertion(String section, String id, String text, String note)
+   {
+      this.section = section;
+      this.id = id;
+      this.text = text;
+      this.note = note;
+   }
+   
+   public String getSection()
+   {
+      return section;
+   }
+   
+   public String getId()
+   {
+      return id;
+   }
+   
+   public String getText()
+   {
+      return text;
+   }
+   
+   public String getNote()
+   {
+      return note;
+   }
+
+   public int compareTo(AuditAssertion other)
+   {            
+      int i = section.compareTo(other.section);      
+      return i != 0 ? i : id.compareTo(other.id);
+   }
+   
+   
+}


Property changes on: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/AuditAssertion.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/AuditParser.java
===================================================================
--- validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/AuditParser.java	                        (rev 0)
+++ validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/AuditParser.java	2009-02-05 17:41:58 UTC (rev 15906)
@@ -0,0 +1,200 @@
+package org.hibernate.tck.report;
+
+import java.io.InputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.Comparator;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+import javax.xml.parsers.DocumentBuilder;
+import javax.xml.parsers.DocumentBuilderFactory;
+
+import org.w3c.dom.Document;
+import org.w3c.dom.Element;
+import org.w3c.dom.Node;
+import org.w3c.dom.NodeList;
+
+/**
+ * Parsing utilities for tck-audit.xml
+ * 
+ * @author Shane Bryzak
+ * 
+ */
+public class AuditParser
+{
+   private String version;
+   
+   private Map<String,List<AuditAssertion>> assertions = new HashMap<String,List<AuditAssertion>>();
+   
+   private Map<String,String> titles = new HashMap<String,String>();   
+   
+   private InputStream source;
+   
+   public AuditParser(InputStream source)
+   {
+      this.source = source;
+   }   
+   
+   public String getVersion()
+   {
+      return version;
+   }
+   
+   public String getSectionTitle(String sectionId)
+   {
+      return titles.get(sectionId);
+   }
+   
+   public Map<String,List<AuditAssertion>> getAssertions()
+   {
+      return assertions;
+   }
+   
+   public List<String> getSectionIds()
+   {
+      List<String> sectionIds = new ArrayList<String>(assertions.keySet());
+      
+      Collections.sort(sectionIds, new Comparator<String>() {
+         public int compare(String value1, String value2)
+         {
+            String[] parts1 = value1.split("[.]");
+            String[] parts2 = value2.split("[.]");
+            
+            for (int i = 0;;i++)
+            {                              
+               if (parts1.length < (i + 1)) 
+               {
+                  return parts2.length < (i + 1) ? 0 : 0;
+               }
+               else if (parts2.length < (i + 1))
+               {
+                  return parts1.length < (i + 1) ? 0 : 1;
+               }
+
+               try
+               {
+                  int val1 = Integer.parseInt(parts1[i]);
+                  int val2 = Integer.parseInt(parts2[i]);
+                  
+                  if (val1 != val2) return val1 - val2;
+               }
+               catch (NumberFormatException ex)
+               {
+                  int comp = parts1[i].compareTo(parts2[i]);
+                  if (comp != 0) 
+                  {
+                     return comp;
+                  }                  
+               }                              
+            }            
+         }
+      });
+      
+      return sectionIds;
+   }
+   
+   /**
+    * Returns a sorted list of assertions for the specified section ID
+    * 
+    * @param sectionId
+    * @return
+    */
+   public List<AuditAssertion> getAssertionsForSection(String sectionId)
+   {
+      List<AuditAssertion> sectionAssertions = new ArrayList<AuditAssertion>(assertions.get(sectionId));
+      Collections.sort(sectionAssertions);
+      return sectionAssertions;
+   }
+   
+   /**
+    * 
+    * @param sectionId
+    * @param assertionId
+    * @return
+    */
+   public boolean hasAssertion(String sectionId, String assertionId)
+   {
+      if (!assertions.containsKey(sectionId)) return false;
+      
+      for (AuditAssertion assertion : assertions.get(sectionId))
+      {
+         if (assertion.getId().equals(assertionId)) return true;
+      }
+      
+      return false;
+   }
+   
+   /**
+    * Load the spec assertions defined in tck-audit.xml 
+    */
+   public void parse() throws Exception
+   {
+      DocumentBuilder builder = DocumentBuilderFactory.newInstance().newDocumentBuilder();
+      
+      Document doc = builder.parse(source);
+      NodeList sectionNodes = doc.getDocumentElement().getChildNodes();
+      
+      version = doc.getDocumentElement().getAttribute("version");
+      
+      for (int i = 0; i < sectionNodes.getLength(); i++)
+      {         
+         if (sectionNodes.item(i) instanceof Element && 
+             "section".equals(sectionNodes.item(i).getNodeName()))
+         {
+            processSectionNode((Element) sectionNodes.item(i));
+         }
+      }
+   }
+   
+   private void processSectionNode(Element node)
+   {
+      String sectionId = node.getAttribute("id");
+      titles.put(sectionId, node.getAttribute("title"));                                
+      
+      NodeList assertionNodes = node.getChildNodes();
+      
+      for (int i = 0; i < assertionNodes.getLength(); i++)
+      {
+         if (assertionNodes.item(i) instanceof Element && 
+             "assertion".equals(assertionNodes.item(i).getNodeName()))
+         {
+            processAssertionNode(sectionId, (Element) assertionNodes.item(i));            
+         }
+      }            
+   }
+   
+   private void processAssertionNode(String sectionId, Element node)
+   {
+      List<AuditAssertion> value = assertions.get(sectionId);
+      if (value == null)
+      {
+         value = new ArrayList<AuditAssertion>();
+         assertions.put(sectionId, value);                                          
+      }
+                        
+      String text = null;
+      String note = null;
+      
+      for (int i = 0; i < node.getChildNodes().getLength(); i++)
+      {
+         Node child = node.getChildNodes().item(i);
+         
+         if (child instanceof Element)
+         {
+            if ("text".equals(child.getNodeName()))
+            {
+               text = child.getTextContent();
+            }
+            else if ("note".equals(child.getNodeName()))
+            {
+               note = child.getTextContent();
+            }              
+         }                   
+      }
+      
+      value.add(new AuditAssertion(node.getAttribute("section"), 
+            node.getAttribute("id"), text, note));      
+   }
+}


Property changes on: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/AuditParser.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessor.java
===================================================================
--- validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessor.java	                        (rev 0)
+++ validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessor.java	2009-02-05 17:41:58 UTC (rev 15906)
@@ -0,0 +1,105 @@
+package org.hibernate.tck.report;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+
+import com.sun.mirror.apt.AnnotationProcessor;
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+import com.sun.mirror.declaration.Declaration;
+import com.sun.mirror.declaration.MethodDeclaration;
+import com.sun.mirror.util.DeclarationVisitors;
+import com.sun.mirror.util.SimpleDeclarationVisitor;
+
+/**
+ * Annotation processor for generating TCK coverage report
+ * 
+ * @author Shane Bryzak
+ */
+public class CoverageProcessor implements AnnotationProcessor
+{
+   private static final String OUTDIR_OPTION_NAME = "-s";
+   private static final String REPORT_FILE_NAME = "coverage.html"; 
+   
+   private static final String AUDIT_FILE_NAME = "tck-audit.xml";
+      
+   private final AnnotationProcessorEnvironment env;
+   private final File baseDir;
+   
+   private final List<SpecReference> references = new ArrayList<SpecReference>();
+   
+   private AuditParser auditParser;
+   
+   public CoverageProcessor(AnnotationProcessorEnvironment env)
+   {
+      this.env = env;
+      String baseDirName = env.getOptions().get( OUTDIR_OPTION_NAME );
+      baseDir = new File( baseDirName );
+      baseDir.mkdirs();
+      
+      try
+      {
+         auditParser = new AuditParser(new FileInputStream(AUDIT_FILE_NAME));
+         auditParser.parse();
+      }
+      catch (Exception ex)
+      {
+         throw new RuntimeException("Error parsing tck-audit.xml: " + 
+               ex.getClass().getName() + " - " + ex.getMessage(), ex);
+      }
+   }
+
+   public void process()
+   {
+      AnnotationTypeDeclaration annotationType = (AnnotationTypeDeclaration) 
+         env.getTypeDeclaration(SpecAssertion.class.getCanonicalName());
+      
+      for (Declaration d : env.getDeclarationsAnnotatedWith(annotationType))
+      {
+         d.accept(DeclarationVisitors.getDeclarationScanner(
+               new CreateReferenceVisitor(), DeclarationVisitors.NO_OP));
+      }
+      
+      annotationType = (AnnotationTypeDeclaration) 
+      env.getTypeDeclaration(SpecAssertions.class.getCanonicalName());
+      for (Declaration d : env.getDeclarationsAnnotatedWith(annotationType))
+      {
+         d.accept(DeclarationVisitors.getDeclarationScanner(
+               new CreateReferenceVisitor(), DeclarationVisitors.NO_OP));
+      }      
+      
+      
+      new CoverageReport(references, auditParser).writeToFile(new File(baseDir, REPORT_FILE_NAME));
+   }     
+   
+   private class CreateReferenceVisitor extends SimpleDeclarationVisitor 
+   {
+      public void visitMethodDeclaration(MethodDeclaration d) 
+      {
+         SpecAssertions assertions = d.getAnnotation ( SpecAssertions.class );
+         if (assertions != null)
+         {
+            for (SpecAssertion assertion : assertions.value())
+            {
+               SpecReference ref = new SpecReference(
+                     assertion.section(), assertion.id(), 
+                     d.getDeclaringType().getSimpleName(), d.getSimpleName()); 
+               references.add( ref );               
+            }
+         }
+         
+         SpecAssertion assertion = d.getAnnotation( SpecAssertion.class );
+         if (assertion != null)
+         {
+            SpecReference ref = new SpecReference(
+                  assertion.section(), assertion.id(), 
+                  d.getDeclaringType().getSimpleName(), d.getSimpleName()); 
+            references.add( ref );
+         }
+      }
+   }   
+}

Property changes on: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessor.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessorFactory.java
===================================================================
--- validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessorFactory.java	                        (rev 0)
+++ validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessorFactory.java	2009-02-05 17:41:58 UTC (rev 15906)
@@ -0,0 +1,40 @@
+package org.hibernate.tck.report;
+
+import java.util.Arrays;
+import java.util.Collection;
+import java.util.Collections;
+import java.util.Set;
+
+import org.hibernate.tck.annotations.SpecAssertion;
+
+import com.sun.mirror.apt.AnnotationProcessor;
+import com.sun.mirror.apt.AnnotationProcessorEnvironment;
+import com.sun.mirror.apt.AnnotationProcessorFactory;
+import com.sun.mirror.declaration.AnnotationTypeDeclaration;
+
+public class CoverageProcessorFactory implements AnnotationProcessorFactory
+{
+   private static final Collection<String> supportedAnnotations = Collections.unmodifiableCollection(
+         Arrays.asList(
+               SpecAssertion.class.getCanonicalName(),
+               SpecAssertions.class.getCanonicalName()
+         )
+   );
+   
+   public AnnotationProcessor getProcessorFor(Set<AnnotationTypeDeclaration> annotationTypeDeclarations,
+         AnnotationProcessorEnvironment env)
+   {
+      return new CoverageProcessor(env);
+   }
+
+   public Collection<String> supportedAnnotationTypes()
+   {
+      return supportedAnnotations;
+   }
+
+   public Collection<String> supportedOptions()
+   {
+      return null;
+   }
+
+}

Property changes on: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageProcessorFactory.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageReport.java
===================================================================
--- validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageReport.java	                        (rev 0)
+++ validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageReport.java	2009-02-05 17:41:58 UTC (rev 15906)
@@ -0,0 +1,253 @@
+package org.hibernate.tck.report;
+
+import java.io.File;
+import java.io.FileOutputStream;
+import java.io.IOException;
+import java.io.OutputStream;
+import java.util.ArrayList;
+import java.util.Collections;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Generates the TCK spec coverage report
+ *  
+ * @author Shane Bryzak
+ */
+public class CoverageReport
+{
+   /*
+    * References to the spec assertions made by the tck tests
+    */
+   private final Map<String,List<SpecReference>> references;
+   
+   private AuditParser auditParser;
+   
+   public CoverageReport(List<SpecReference> references, AuditParser auditParser)
+   {
+      this.references = new HashMap<String,List<SpecReference>>();
+      
+      for (SpecReference ref : references)
+      {
+         if (!this.references.containsKey(ref.getSection()))
+         {
+            this.references.put(ref.getSection(), new ArrayList<SpecReference>());
+         }
+         
+         this.references.get(ref.getSection()).add(ref);
+      }
+      
+      this.auditParser = auditParser;
+   }
+   
+   public void generate(OutputStream out) throws IOException
+   {
+      writeHeader(out);
+      writeCoverage(out);
+      writeUnmatched(out);
+      writeFooter(out);
+   }
+   
+   private void writeHeader(OutputStream out) throws IOException
+   {
+      StringBuilder sb = new StringBuilder();
+           
+      sb.append("<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n");
+      sb.append("<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.1//EN\"\n");
+      sb.append("\"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\">\n");
+      sb.append("<html>\n");
+      sb.append("<head><title>JSR-299 TCK Coverage Report</title>\n");
+      
+      sb.append("<style type=\"text/css\">\n");
+      sb.append("  .code {\n");
+      sb.append("    float: left;\n");
+      sb.append("    font-weight: bold;\n");
+      sb.append("    width: 50px;\n");
+      sb.append("    margin-top: 0px;\n");
+      sb.append("    height: 100%; }\n");
+      sb.append("  .results {\n");
+      sb.append("    margin-left: 50px; }\n");
+      sb.append("  .description {\n");
+      sb.append("    margin-top: 2px;\n");
+      sb.append("    margin-bottom: 2px; }\n");
+      sb.append("  .sectionHeader {\n");
+      sb.append("    font-weight: bold; }\n");
+      sb.append("  .noCoverage {\n");
+      sb.append("    margin-top: 2px;\n");
+      sb.append("    margin-bottom: 2px;\n");
+      sb.append("    font-weight: bold;\n");
+      sb.append("    font-style: italic;\n");
+      sb.append("    color: #ff0000; }\n");
+      sb.append("   .coverageHeader {\n");
+      sb.append("    font-weight: bold;\n");
+      sb.append("    text-decoration: underline;\n");
+      sb.append("    margin-top: 2px;\n");
+      sb.append("    margin-bottom: 2px; }\n");
+      sb.append("  .pass {\n");
+      sb.append("    background-color: #dfd; }\n");
+      sb.append("  .fail {\n");
+      sb.append("    background-color: #fdd; }\n");
+      
+      sb.append("</style>\n");
+      
+      sb.append("</head><body>");
+      sb.append("<h1>JSR-299 TCK Coverage</h1>");
+      sb.append("<h2>");
+      sb.append(auditParser.getVersion());
+      sb.append("</h2>\n");
+      
+      out.write(sb.toString().getBytes());
+   }
+   
+   private void writeCoverage(OutputStream out) throws IOException
+   {      
+      for (String sectionId : auditParser.getSectionIds())
+      {         
+         out.write(("<div class=\"sectionHeader\">Section " + sectionId + " - " + 
+               auditParser.getSectionTitle(sectionId) + "</div>\n").getBytes());
+         
+         List<AuditAssertion> sectionAssertions = auditParser.getAssertionsForSection(sectionId);
+         
+         if (sectionAssertions != null && !sectionAssertions.isEmpty())
+         {            
+            StringBuilder sb = new StringBuilder(); 
+            
+            for (AuditAssertion assertion : sectionAssertions)
+            {
+               List<SpecReference> coverage = getCoverageForAssertion(sectionId, assertion.getId());               
+               
+               sb.append("  <div class=\"" + (coverage.isEmpty() ? "fail" : "pass") + "\">\n");
+               
+               sb.append("    <span class=\"code\">");
+               sb.append(assertion.getId());
+               sb.append(")");
+               sb.append("</span>\n");
+               
+               sb.append("    <div class=\"results\">");
+               sb.append("<p class=\"description\">");
+               sb.append(assertion.getText());
+               sb.append("</p>\n");
+               
+               sb.append("    <div class=\"coverage\">\n");
+               sb.append("      <p class=\"coverageHeader\">Coverage</p>\n");
+                              
+               if (coverage.isEmpty())
+               {
+                  sb.append("        <p class=\"noCoverage\">No tests exist for this assertion</p>\n");
+               }
+               else
+               {
+                  for (SpecReference ref : coverage)
+                  {
+                     sb.append("        <p>");
+                     sb.append(ref.getClassName());
+                     sb.append(".");
+                     sb.append(ref.getMethodName());
+                     sb.append("()");
+                     sb.append("</p>\n");
+                  }
+               }
+               
+               sb.append("    </div>\n  </div>\n</div>");
+            }
+            
+            out.write(sb.toString().getBytes());
+         }
+      }
+   }
+   
+   private void writeUnmatched(OutputStream out) throws IOException
+   {
+      List<SpecReference> unmatched = new ArrayList<SpecReference>();
+      
+      for (String sectionId : references.keySet())
+      {
+         for (SpecReference ref : references.get(sectionId))
+         {
+            if (!auditParser.hasAssertion(ref.getSection(), ref.getAssertion()))
+            {
+               unmatched.add(ref);
+            }
+         }         
+      }
+      
+      if (unmatched.isEmpty()) return;
+      
+      StringBuilder sb = new StringBuilder();
+      
+      sb.append("<h3>Unmatched tests</h3>\n");
+      sb.append(String.format("<p>The following %d tests do not match any known assertions:</p>", 
+            unmatched.size()));
+            
+      sb.append("<table border=\"1\" cellspacing=\"0\" cellpadding=\"0\">\n");
+      sb.append("  <tr><th>Section</th><th>Assertion</th><th>Test Class</th><th>Test Method</th></tr>\n");
+      
+      for (SpecReference ref : unmatched)
+      {
+         sb.append("<tr>");
+         
+         sb.append("<td>");
+         sb.append(ref.getSection());
+         sb.append("</td>");
+
+         sb.append("<td>");
+         sb.append(ref.getAssertion());
+         sb.append("</td>");
+         
+         sb.append("<td>");
+         sb.append(ref.getClassName());
+         sb.append("</td>");
+         
+         sb.append("<td>");
+         sb.append(ref.getMethodName());
+         sb.append("()");
+         sb.append("</td>");
+         
+         sb.append("</tr>");
+      }
+      
+      sb.append("</table>");
+      
+      out.write(sb.toString().getBytes());
+   }
+   
+   private List<SpecReference> getCoverageForAssertion(String sectionId, String assertionId)
+   {
+      List<SpecReference> refs = new ArrayList<SpecReference>();
+      
+      if (references.containsKey(sectionId))
+      {      
+         for (SpecReference ref : references.get(sectionId))
+         {
+            if (ref.getAssertion().equals(assertionId))
+            {
+               refs.add(ref);
+            }
+         }
+      }
+      
+      return refs;
+   }
+     
+   private void writeFooter(OutputStream out) throws IOException
+   {
+      out.write("</table>".getBytes());
+      out.write("</body></html>".getBytes());
+   }
+   
+   public void writeToFile(File file)
+   {      
+      try
+      {
+         FileOutputStream out = new FileOutputStream(file);
+         generate(out);
+         out.flush();
+         out.close();
+      }
+      catch (IOException ex)
+      {
+         throw new RuntimeException("Error generating report file", ex);
+      }      
+   }
+}


Property changes on: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/CoverageReport.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain

Added: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/SpecReference.java
===================================================================
--- validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/SpecReference.java	                        (rev 0)
+++ validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/SpecReference.java	2009-02-05 17:41:58 UTC (rev 15906)
@@ -0,0 +1,42 @@
+package org.hibernate.tck.report;
+
+/**
+ * Represents the metadata for a single instance of @SpecAssertion
+ * 
+ * @author Shane Bryzak
+ */
+public class SpecReference
+{
+   private String section;
+   private String assertion;
+   private String className;
+   private String methodName;
+   
+   SpecReference(String section, String assertion, String className, String methodName)
+   {
+      this.section = section;
+      this.assertion = assertion;
+      this.className = className;
+      this.methodName = methodName;
+   }
+   
+   public String getSection()
+   {
+      return section;
+   }
+   
+   public String getAssertion()
+   {
+      return assertion;
+   }
+   
+   public String getClassName()
+   {
+      return className;
+   }
+   
+   public String getMethodName()
+   {
+      return methodName;
+   }
+}


Property changes on: validator/trunk/tck-utils/src/main/java/org/hibernate/tck/report/SpecReference.java
___________________________________________________________________
Name: svn:mime-type
   + text/plain




More information about the hibernate-commits mailing list