Skip to content

Commit

Permalink
Restore unused code and deprecate
Browse files Browse the repository at this point in the history
  • Loading branch information
AB-xdev committed Jan 14, 2025
1 parent 3f5ed55 commit 1fc551a
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@
*
* @author Vaadin Ltd
* @since 1.0.
* @deprecated Unused. Will be removed without replacement
*/
@Deprecated(forRemoval = true)
public class Fragment {
protected String name;
protected final Set<String> files = new HashSet<>();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,33 @@ public class ReflectTools implements Serializable {

private static final Predicate<Method> IS_SYNTHETIC = Method::isSynthetic;

/**
* Locates the method in the given class. Returns null if the method is not
* found. Throws an ExceptionInInitializerError if there is a problem
* locating the method as this is mainly called from static blocks.
*
* @param cls
* Class that contains the method
* @param methodName
* The name of the method
* @param parameterTypes
* The parameter types for the method.
* @return A reference to the method
* @throws ExceptionInInitializerError
* Wraps any exception in an {@link ExceptionInInitializerError}
* so this method can be called from a static initializer.
* @deprecated Unused. Will be removed without replacement.
*/
@Deprecated(forRemoval = true)
public static Method findMethod(Class<?> cls, String methodName,
Class<?>... parameterTypes) throws ExceptionInInitializerError {
try {
return cls.getDeclaredMethod(methodName, parameterTypes);
} catch (Exception e) {
throw new ExceptionInInitializerError(e);
}
}

/**
* Returns the value of the java field.
* <p>
Expand Down

0 comments on commit 1fc551a

Please sign in to comment.