This repository has been archived by the owner on Feb 26, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #526 from excilys/272_Otto_integration
Otto integration. Fixes #272
- Loading branch information
Showing
13 changed files
with
386 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
.../androidannotations/src/main/java/org/androidannotations/processing/ProduceProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Copyright (C) 2010-2013 eBusiness Information, Excilys Group | ||
* | ||
* 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 org.androidannotations.processing; | ||
|
||
import static org.androidannotations.helper.CanonicalNameConstants.PRODUCE; | ||
|
||
import javax.lang.model.element.Element; | ||
import javax.lang.model.element.ExecutableElement; | ||
|
||
import org.androidannotations.helper.APTCodeModelHelper; | ||
|
||
import com.sun.codemodel.JClassAlreadyExistsException; | ||
import com.sun.codemodel.JCodeModel; | ||
import com.sun.codemodel.JMethod; | ||
|
||
public class ProduceProcessor implements DecoratingElementProcessor { | ||
|
||
private final APTCodeModelHelper helper = new APTCodeModelHelper(); | ||
|
||
@Override | ||
public String getTarget() { | ||
return PRODUCE; | ||
} | ||
|
||
@Override | ||
public void process(Element element, JCodeModel codeModel, EBeanHolder holder) throws JClassAlreadyExistsException { | ||
|
||
ExecutableElement executableElement = (ExecutableElement) element; | ||
|
||
JMethod delegatingMethod = helper.overrideAnnotatedMethod(executableElement, holder); | ||
|
||
delegatingMethod.annotate(holder.refClass(PRODUCE)); | ||
} | ||
|
||
} |
48 changes: 48 additions & 0 deletions
48
...ndroidannotations/src/main/java/org/androidannotations/processing/SubscribeProcessor.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
/** | ||
* Copyright (C) 2010-2013 eBusiness Information, Excilys Group | ||
* | ||
* 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 org.androidannotations.processing; | ||
|
||
import static org.androidannotations.helper.CanonicalNameConstants.SUBSCRIBE; | ||
|
||
import javax.lang.model.element.Element; | ||
import javax.lang.model.element.ExecutableElement; | ||
|
||
import org.androidannotations.helper.APTCodeModelHelper; | ||
|
||
import com.sun.codemodel.JClassAlreadyExistsException; | ||
import com.sun.codemodel.JCodeModel; | ||
import com.sun.codemodel.JMethod; | ||
|
||
public class SubscribeProcessor implements DecoratingElementProcessor { | ||
|
||
private final APTCodeModelHelper helper = new APTCodeModelHelper(); | ||
|
||
@Override | ||
public String getTarget() { | ||
return SUBSCRIBE; | ||
} | ||
|
||
@Override | ||
public void process(Element element, JCodeModel codeModel, EBeanHolder holder) throws JClassAlreadyExistsException { | ||
|
||
ExecutableElement executableElement = (ExecutableElement) element; | ||
|
||
JMethod delegatingMethod = helper.overrideAnnotatedMethod(executableElement, holder); | ||
|
||
delegatingMethod.annotate(holder.refClass(SUBSCRIBE)); | ||
} | ||
|
||
} |
Oops, something went wrong.