mirror of
https://github.com/NationalSecurityAgency/ghidra.git
synced 2025-10-06 03:50:02 +02:00
GT-2732 - Hovers - Created a hover for a reference to an address that is
not in memory
This commit is contained in:
parent
776b8b73b2
commit
853759ef7c
8 changed files with 305 additions and 43 deletions
|
@ -0,0 +1,33 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package ghidra.generic.function;
|
||||
|
||||
/**
|
||||
* A generic functional interface that is more semantically sound than {@link Runnable}. Use
|
||||
* anywhere you wish to have a generic callback function and you need to throw an exception.
|
||||
*
|
||||
* @param <E> the exception of your choice
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ExceptionalCallback<E extends Exception> {
|
||||
|
||||
/**
|
||||
* The method that will be called
|
||||
*
|
||||
* @throws Exception if the call throws an exception
|
||||
*/
|
||||
public void call() throws E;
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package ghidra.generic.function;
|
||||
|
||||
/**
|
||||
* A generic functional interface that allows you to consume an item and potentially throw
|
||||
* an exception.
|
||||
*
|
||||
* @param <T> the input type
|
||||
* @param <E> the exception of your choice
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ExceptionalConsumer<T, E extends Exception> {
|
||||
|
||||
/**
|
||||
* The method that will be called
|
||||
*
|
||||
* @param t the input
|
||||
* @throws E if the call throws an exception
|
||||
*/
|
||||
public void accept(T t) throws E;
|
||||
}
|
|
@ -0,0 +1,37 @@
|
|||
/* ###
|
||||
* IP: GHIDRA
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
* You may obtain a copy of the License at
|
||||
*
|
||||
* http://www.apache.org/licenses/LICENSE-2.0
|
||||
*
|
||||
* Unless required by applicable law or agreed to in writing, software
|
||||
* distributed under the License is distributed on an "AS IS" BASIS,
|
||||
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
* See the License for the specific language governing permissions and
|
||||
* limitations under the License.
|
||||
*/
|
||||
package ghidra.generic.function;
|
||||
|
||||
/**
|
||||
* A generic functional interface that allows you to consume an item, return a result,
|
||||
* and potentially throw an exception.
|
||||
*
|
||||
* @param <I> the input type
|
||||
* @param <R> the result type
|
||||
* @param <E> the exception of your choice
|
||||
*/
|
||||
@FunctionalInterface
|
||||
public interface ExceptionalFunction<I, R, E extends Exception> {
|
||||
|
||||
/**
|
||||
* The method that will be called
|
||||
*
|
||||
* @param i the input
|
||||
* @return the result of the call
|
||||
* @throws E if the call throws an exception
|
||||
*/
|
||||
public R apply(I i) throws E;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue