myfaces-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lof...@apache.org
Subject [myfaces-tobago] branch master updated: implement toString() and make parent class abstract
Date Thu, 29 Aug 2019 05:11:28 GMT
This is an automated email from the ASF dual-hosted git repository.

lofwyr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/myfaces-tobago.git


The following commit(s) were added to refs/heads/master by this push:
     new 0b7d6f0  implement toString() and make parent class abstract
0b7d6f0 is described below

commit 0b7d6f0bbae9a7308caf21d601d600eb7e2b4bf8
Author: Udo Schnurpfeil <lofwyr@apache.org>
AuthorDate: Thu Aug 29 07:11:17 2019 +0200

    implement toString() and make parent class abstract
    
    issue: TOBAGO-1633: TS refactoring
---
 .../java/org/apache/myfaces/tobago/context/ThemeResource.java  |  2 +-
 .../java/org/apache/myfaces/tobago/context/ThemeScript.java    | 10 ++++++++++
 .../java/org/apache/myfaces/tobago/context/ThemeStyle.java     |  9 +++++++++
 3 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeResource.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeResource.java
index 3b22eed..337f88d 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeResource.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeResource.java
@@ -24,7 +24,7 @@ import java.io.Serializable;
 /**
  * @since 1.5.0
  */
-public class ThemeResource implements Serializable {
+public abstract class ThemeResource implements Serializable {
 
   private String name;
   private int priority;
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeScript.java
b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeScript.java
index ce9b4e6..cb16ed9 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeScript.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeScript.java
@@ -55,4 +55,14 @@ public final class ThemeScript extends ThemeResource {
   public int hashCode() {
     return Objects.hash(super.hashCode(), type);
   }
+
+  @Override
+  public String toString() {
+    return "ThemeScript{" +
+        "type='" + type + '\'' +
+        ", name='" + getName() + '\'' +
+        ", priority=" + getPriority() +
+        '}';
+  }
+
 }
diff --git a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeStyle.java b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeStyle.java
index 2bc6c20..7182542 100644
--- a/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeStyle.java
+++ b/tobago-core/src/main/java/org/apache/myfaces/tobago/context/ThemeStyle.java
@@ -23,4 +23,13 @@ package org.apache.myfaces.tobago.context;
  * @since 1.5.0
  */
 public final class ThemeStyle extends ThemeResource {
+
+  @Override
+  public String toString() {
+    return "ThemeStyle{" +
+        "name='" + getName() + '\'' +
+        ", priority=" + getPriority() +
+        '}';
+  }
+
 }


Mime
View raw message