Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gjjs-mda
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
model-driver
gjjs-mda
Commits
bb212b7b
Commit
bb212b7b
authored
Dec 08, 2022
by
s_guodong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改注解增强
parent
74414af5
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
25 deletions
+3
-25
ModuleAnnotationTranslator.java
...ance/annotation/processor/ModuleAnnotationTranslator.java
+3
-5
BDGetterEnhance.java
...ce/annotation/processor/enhance/impl/BDGetterEnhance.java
+0
-20
No files found.
src/main/java/com/brilliance/annotation/processor/ModuleAnnotationTranslator.java
View file @
bb212b7b
...
...
@@ -58,11 +58,9 @@ public class ModuleAnnotationTranslator extends TreeTranslator {
AbstractAnnotationEnhance
annotationEnhance
=
new
ModuleSetterEnhance
();
processAnnotationEnhance
(
annotationEnhance
,
null
,
jcClassDecl
,
it
);
}
if
(
needGenerateMethod
(
annotations
,
TDGetter
.
class
.
getName
())
&&
isValidField
(
it
))
{
AbstractAnnotationEnhance
annotationEnhance
=
new
ModuleGetterEnhance
();
processAnnotationEnhance
(
annotationEnhance
,
null
,
jcClassDecl
,
it
);
}
if
(
needGenerateMethod
(
annotations
,
BDGetter
.
class
.
getName
())
&&
isValidField
(
it
))
{
if
((
needGenerateMethod
(
annotations
,
TDGetter
.
class
.
getName
())
||
needGenerateMethod
(
annotations
,
BDGetter
.
class
.
getName
()))
&&
isValidField
(
it
))
{
AbstractAnnotationEnhance
annotationEnhance
=
new
ModuleGetterEnhance
();
processAnnotationEnhance
(
annotationEnhance
,
null
,
jcClassDecl
,
it
);
}
...
...
src/main/java/com/brilliance/annotation/processor/enhance/impl/BDGetterEnhance.java
View file @
bb212b7b
...
...
@@ -66,26 +66,6 @@ public class BDGetterEnhance extends AbstractAnnotationEnhance {
.
append
(
treeMaker
.
Select
(
treeMaker
.
Ident
(
names
.
fromString
(
tClass
)),
names
.
fromString
(
"class"
)))
.
toList
(),
null
);
}
else
if
(
variableDecl
.
vartype
.
type
.
toString
().
equals
(
moduleClassNameProperties
.
get
(
"IPanel"
))
||
variableDecl
.
vartype
.
type
.
toString
().
equals
(
moduleClassNameProperties
.
get
(
"PanelImpl"
)))
{
String
i18n
=
AnnotationEnhanceUtils
.
findAnnotationArguments
(
args
,
"i18n"
,
""
).
replaceAll
(
"\""
,
""
);
jcNewClass
=
treeMaker
.
NewClass
(
null
,
com
.
sun
.
tools
.
javac
.
util
.
List
.
nil
(),
treeMaker
.
Ident
(
names
.
fromString
(
"PanelImpl"
)),
new
ListBuffer
<
JCTree
.
JCExpression
>()
.
append
(
treeMaker
.
Literal
(
variableDecl
.
name
.
toString
()))
.
append
(
treeMaker
.
Apply
(
com
.
sun
.
tools
.
javac
.
util
.
List
.
nil
(),
treeMaker
.
Select
(
treeMaker
.
Ident
(
names
.
fromString
(
"MdaUtils"
)),
names
.
fromString
(
"getI18NString"
)),
new
ListBuffer
<
JCTree
.
JCExpression
>()
.
append
(
treeMaker
.
Ident
(
names
.
fromString
(
"this"
)))
.
append
(
treeMaker
.
Literal
(
TypeTag
.
CLASS
,
i18n
))
.
toList
()
))
.
append
(
treeMaker
.
Ident
(
names
.
fromString
(
"this"
)))
.
toList
(),
null
);
}
else
if
(
variableDecl
.
vartype
.
type
.
toString
().
equals
(
moduleClassNameProperties
.
get
(
"IStream"
))
||
variableDecl
.
vartype
.
type
.
toString
().
equals
(
moduleClassNameProperties
.
get
(
"StreamImpl"
)))
{
jcNewClass
=
treeMaker
.
NewClass
(
null
,
...
...
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