Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-bd-common
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
s_guodong
gjjs-bd-common
Commits
76824080
Commit
76824080
authored
Aug 28, 2023
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
注释defaultRule执行的方法
parent
cb79c2a7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
45 additions
and
47 deletions
+45
-47
Argument.java
...in/java/com/brilliance/mda/runtime/mda/impl/Argument.java
+2
-2
Modules.java
...ain/java/com/brilliance/mda/runtime/mda/util/Modules.java
+43
-45
No files found.
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/impl/Argument.java
View file @
76824080
...
...
@@ -15,7 +15,7 @@ public class Argument<E> implements IResult {
}
public
Argument
(
String
fieldName
)
{
this
.
fieldName
=
"trim("
+
fieldName
+
")"
;
this
.
fieldName
=
fieldName
;
}
public
Argument
(
String
fieldName
,
OpType
opType
,
E
value
)
{
...
...
@@ -29,7 +29,7 @@ public class Argument<E> implements IResult {
}
public
Argument
(
String
fieldName
,
OpType
opType
)
{
this
.
fieldName
=
"trim("
+
fieldName
+
")"
;
this
.
fieldName
=
fieldName
;
this
.
opType
=
opType
;
this
.
value
=
null
;
}
...
...
gjjs-bd-runtime/src/main/java/com/brilliance/mda/runtime/mda/util/Modules.java
View file @
76824080
...
...
@@ -4,8 +4,6 @@ import com.brilliance.mda.runtime.mda.*;
import
com.brilliance.mda.runtime.mda.driver.DCR
;
import
com.brilliance.mda.runtime.mda.driver.MdaDriver
;
import
com.brilliance.mda.runtime.mda.driver.MdaEnv
;
import
com.brilliance.mda.runtime.mda.driver.compile.component.AbstractAutoCompileEmitter
;
import
com.brilliance.mda.runtime.mda.driver.compile.component.AbstractAutoCompileScopeEmitter
;
import
com.brilliance.mda.runtime.mda.impl.AbstractScopeEmitter
;
import
com.brilliance.mda.runtime.mda.impl.Argument
;
import
com.brilliance.mda.runtime.mda.impl.ModuleList
;
...
...
@@ -100,49 +98,49 @@ public class Modules {
//ExecuteDefault
public
static
void
postDefaultRule
(
IModule
module
,
String
field
)
{
if
(
field
!=
null
)
{
if
(
module
.
getParent
()
instanceof
IModuleList
)
{
//modulelist的儿子模型
AbstractScopeEmitter
scopeEmitter
=
DCR
.
getModuleListEmitter
(((
IModuleList
)
module
.
getParent
()).
getDataClass
());
scopeEmitter
.
acceptContext
(
module
);
if
(
scopeEmitter
instanceof
AbstractAutoCompileScopeEmitter
)
{
((
AbstractAutoCompileScopeEmitter
)
scopeEmitter
).
executePostDefault
(
field
);
}
else
{
scopeEmitter
.
executeDefault
(
field
);
}
scopeEmitter
.
removeContext
();
}
else
{
String
fieldPath
=
module
.
getFieldPath
(
field
);
int
leftCommas
=
fieldPath
.
indexOf
(
'('
);
if
(
leftCommas
>
-
1
)
{
//modulelist的孙子模型
int
rightCommas
=
fieldPath
.
indexOf
(
leftCommas
,
')'
);
String
relativePath
=
fieldPath
.
substring
(
rightCommas
+
1
);
//String moduleListPath = fieldPath.substring(0, leftCommas);
IModule
parent
=
module
.
getParent
();
IModule
scopeModule
=
module
;
while
(
parent
!=
null
&&
!(
parent
instanceof
IModuleList
))
{
scopeModule
=
parent
;
parent
=
parent
.
getParent
();
}
AbstractScopeEmitter
scopeEmitter
=
DCR
.
getModuleListEmitter
(((
IModuleList
)
parent
).
getDataClass
());
scopeEmitter
.
acceptContext
(
scopeModule
);
if
(
scopeEmitter
instanceof
AbstractAutoCompileScopeEmitter
)
{
((
AbstractAutoCompileScopeEmitter
)
scopeEmitter
).
executePostDefault
(
relativePath
);
}
else
{
scopeEmitter
.
executeDefault
(
relativePath
);
}
scopeEmitter
.
removeContext
();
}
else
{
if
(
MdaEnv
.
getContext
().
getEmitter
()
instanceof
AbstractAutoCompileEmitter
)
{
((
AbstractAutoCompileEmitter
)
MdaEnv
.
getContext
().
getEmitter
()).
executePostDefault
(
fieldPath
);
}
else
{
MdaEnv
.
getContext
().
getEmitter
().
executeDefault
(
fieldPath
);
}
}
}
}
else
MdaEnv
.
getContext
().
getEmitter
().
executeDefault
(
module
.
getPath
());
//
if (field != null) {
//
if (module.getParent() instanceof IModuleList) {
//
//modulelist的儿子模型
//
AbstractScopeEmitter scopeEmitter = DCR.getModuleListEmitter(((IModuleList) module.getParent()).getDataClass());
//
scopeEmitter.acceptContext(module);
//
if (scopeEmitter instanceof AbstractAutoCompileScopeEmitter) {
//
((AbstractAutoCompileScopeEmitter) scopeEmitter).executePostDefault(field);
//
} else {
//
scopeEmitter.executeDefault(field);
//
}
//
scopeEmitter.removeContext();
//
} else {
//
String fieldPath = module.getFieldPath(field);
//
int leftCommas = fieldPath.indexOf('(');
//
if (leftCommas > -1) {
//
//modulelist的孙子模型
//
int rightCommas = fieldPath.indexOf(leftCommas, ')');
//
String relativePath = fieldPath.substring(rightCommas + 1);
//
//String moduleListPath = fieldPath.substring(0, leftCommas);
//
IModule parent = module.getParent();
//
IModule scopeModule = module;
//
while (parent != null && !(parent instanceof IModuleList)) {
//
scopeModule = parent;
//
parent = parent.getParent();
//
}
//
AbstractScopeEmitter scopeEmitter = DCR.getModuleListEmitter(((IModuleList) parent).getDataClass());
//
scopeEmitter.acceptContext(scopeModule);
//
if (scopeEmitter instanceof AbstractAutoCompileScopeEmitter) {
//
((AbstractAutoCompileScopeEmitter) scopeEmitter).executePostDefault(relativePath);
//
} else {
//
scopeEmitter.executeDefault(relativePath);
//
}
//
scopeEmitter.removeContext();
//
} else {
//
if (MdaEnv.getContext().getEmitter() instanceof AbstractAutoCompileEmitter) {
//
((AbstractAutoCompileEmitter) MdaEnv.getContext().getEmitter()).executePostDefault(fieldPath);
//
} else {
//
MdaEnv.getContext().getEmitter().executeDefault(fieldPath);
//
}
//
}
//
}
//
} else
//
MdaEnv.getContext().getEmitter().executeDefault(module.getPath());
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment