-
Notifications
You must be signed in to change notification settings - Fork 1
/
Patterns.cs
44 lines (32 loc) · 2.11 KB
/
Patterns.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
namespace fastLPI.tools.decompiler.helper
{
public class Patterns
{
internal static readonly string JavaPackagePattern =
@"package(\s+?|\w+?|\.)*;";
internal static readonly string JavaClassPattern =
@"(private|public final|public abstract|public|\b)(\s+?)*class(\s+?)*(\w+?)*";
internal static readonly string JavaClassStartPattern =
@"(private|public final|public abstract|public|\b)(\s+?)*class(\s+?)*";
internal static readonly string JavaInterfacePattern =
@"(private|public final|public abstract|public|\b)(\s+?)*interface(\s+?)*(\w+?)*";
internal static readonly string JavaInterfaceStartPattern =
@"(private|public final|public abstract|public|\b)(\s+?)*interface(\s+?)*";
internal static readonly string JavaEnumPattern =
@"(private|public final|public abstract|public|\b)(\s+?)*enum(\s+?)*(\w+?)*";
internal static readonly string JavaEnumStartPattern =
@"(private|public final|public abstract|public|\b)(\s+?)*enum(\s+?)*";
internal static readonly string JavaAccesslevelsPattern =
@"(private|public final|public abstract|public)";
internal static readonly string AnyClassPattern =
@"(private|public final|public abstract|public|\b)(\s+?)*(class|interface|enum)(\s+?|\w+?)*";
internal static readonly string AnyClassStructurePattern =
@"{(\s+?|\w+?|\W+?)*}";
internal static readonly string AnyMethodPattern =
@"(public|private|protected|virtual|abstract|\b)(\s+?)*(static|final|abstract|\b)(\s+?)*(\w+?|\.+?)*(\s+?)*(\w+?)*(\s+?)*\((\w+?|\s+?|\.+?|\,+?|\=+?)*\)";
internal static readonly string AnyMethodStructurePattern =
@"(public|private|protected|virtual|abstract|\b)(\s+?)*(static|final|abstract|\b)(\s+?)*(\w+?|\.+?)*(\s+?)*(\w+?)*(\s+?)*\((\w+?|\s+?|\.+?|\,+?|\=+?)*\)(\s+?)*{[^\{|^\}]*}";
internal static readonly string AnyMethodArgumentsStructurePattern =
@"\((\w+?|\s+?|\.+?|\,+?|\=+?)*\)";
}
}