mirror of
https://github.com/ebean-orm/ebean.git
synced 2024-04-21 10:51:47 +00:00
#2981 - ENH: Add profile-line-number-mode with options none | all | auto ... to control adding line numbers to profile locations
This commit is contained in:
@@ -17,15 +17,32 @@ public interface ProfileLocation {
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and return a new ProfileLocation with a given lineNumber and label.
|
||||
* Create and return a new ProfileLocation with line number.
|
||||
*/
|
||||
static ProfileLocation create(int lineNumber, String label) {
|
||||
return XServiceProvider.profileLocationFactory().create(lineNumber, label);
|
||||
static ProfileLocation createWithLine() {
|
||||
return XServiceProvider.profileLocationFactory().createWithLine();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create and return a new ProfileLocation with a given lineNumber and label.
|
||||
*/
|
||||
static ProfileLocation create(String label) {
|
||||
return XServiceProvider.profileLocationFactory().create(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated in favor of {@link #create(String)}.
|
||||
*/
|
||||
@Deprecated
|
||||
static ProfileLocation create(int lineNumber, String label) {
|
||||
return create(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Deprecated for removal - not used.
|
||||
* Create and return a new ProfileLocation with a given location.
|
||||
*/
|
||||
@Deprecated
|
||||
static ProfileLocation createAt(String location) {
|
||||
return XServiceProvider.profileLocationFactory().createAt(location);
|
||||
}
|
||||
|
||||
@@ -12,6 +12,11 @@ public interface SpiProfileLocationFactory {
|
||||
*/
|
||||
ProfileLocation create();
|
||||
|
||||
/**
|
||||
* Create a profile location with line numbering.
|
||||
*/
|
||||
ProfileLocation createWithLine();
|
||||
|
||||
/**
|
||||
* Create with a given label - used only with {@code @Transaction}.
|
||||
*
|
||||
@@ -19,16 +24,6 @@ public interface SpiProfileLocationFactory {
|
||||
*/
|
||||
ProfileLocation create(String label);
|
||||
|
||||
/**
|
||||
* Create a profile location with a line number.
|
||||
*
|
||||
* @param lineNumber always 0
|
||||
* @param label the label for the transaction
|
||||
*/
|
||||
default ProfileLocation create(int lineNumber, String label) {
|
||||
return create(label);
|
||||
}
|
||||
|
||||
/**
|
||||
* Create a known location.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user