Skip to content

Commit

Permalink
private constructor in utility classes
Browse files Browse the repository at this point in the history
  • Loading branch information
LorenzoBettini committed Nov 17, 2023
1 parent c53fd03 commit 9bc9dd3
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,10 @@
*/
public class ImageTester {

private ImageTester() {

}

public static void assertImageIs(Image expectedImage,
Image actualImage) {
assertImageDataIs(expectedImage.getImageData(), actualImage.getImageData());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,4 +8,28 @@
</message_arguments>
</filter>
</resource>
<resource path="src/org/eclipse/emf/parsley/runtime/util/Exceptions.java" type="org.eclipse.emf.parsley.runtime.util.Exceptions">
<filter id="354463860">
<message_arguments>
<message_argument value="org.eclipse.emf.parsley.runtime.util.Exceptions"/>
<message_argument value="Exceptions()"/>
</message_arguments>
</filter>
</resource>
<resource path="src/org/eclipse/emf/parsley/runtime/util/PolymorphicDispatcher.java" type="org.eclipse.emf.parsley.runtime.util.PolymorphicDispatcher$Predicates">
<filter id="354463860">
<message_arguments>
<message_argument value="org.eclipse.emf.parsley.runtime.util.PolymorphicDispatcher.Predicates"/>
<message_argument value="Predicates()"/>
</message_arguments>
</filter>
</resource>
<resource path="src/org/eclipse/emf/parsley/runtime/util/ReflectionUtil.java" type="org.eclipse.emf.parsley.runtime.util.ReflectionUtil">
<filter id="354463860">
<message_arguments>
<message_argument value="org.eclipse.emf.parsley.runtime.util.ReflectionUtil"/>
<message_argument value="ReflectionUtil()"/>
</message_arguments>
</filter>
</resource>
</component>
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,10 @@
*/
public class Exceptions {

private Exceptions() {

}

public static <T> T throwUncheckedException(Throwable e) {
if (e instanceof RuntimeException) {
throw (RuntimeException) e;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,10 @@ public int getMinParams() {

public static class Predicates {

private Predicates() {

}

public static Predicate<Method> forName(String name) {
return new MethodNameFilter(name, 1, 1);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
*/
public class ReflectionUtil {

private ReflectionUtil() {

}

public static Class<?> getObjectType(Class<?> clazzA) {
if (clazzA != null && clazzA.isPrimitive()) {
if (clazzA == Boolean.TYPE) {
Expand Down

0 comments on commit 9bc9dd3

Please sign in to comment.