• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

Java JMethod类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了Java中com.helger.jcodemodel.JMethod的典型用法代码示例。如果您正苦于以下问题:Java JMethod类的具体用法?Java JMethod怎么用?Java JMethod使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



JMethod类属于com.helger.jcodemodel包,在下文中一共展示了JMethod类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的Java代码示例。

示例1: createFromMap

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
private void createFromMap(JCodeModel codeModel, JDefinedClass genClazz) {
    JMethod fromMap = genClazz.method(JMod.PUBLIC | JMod.STATIC, genClazz, "fromMap");
    fromMap.param(codeModel.directClass(Map.class.getCanonicalName()).narrow(String.class).narrow(Object.class), "obj");
    fromMap.body().directStatement("return obj != null ? new " + genClazz.name() + "(obj) : null;");

    JMethod fromMapList = genClazz.method(JMod.PUBLIC | JMod.STATIC, codeModel.directClass(List.class.getCanonicalName()).narrow(genClazz), "fromMap");
    fromMapList.param(codeModel.directClass(List.class.getCanonicalName()).narrow(codeModel.directClass(Map.class.getCanonicalName()).narrow(String.class).narrow(Object.class)), "obj");

    StringBuilder mBuilder = new StringBuilder()
            .append("if(obj != null) { \n")
            .append("java.util.List<" + genClazz.name() + "> result = new java.util.ArrayList<" + genClazz.name() + ">(); \n")
            .append("for(java.util.Map<String, Object> entry : obj) { \n")
            .append("result.add(new " + genClazz.name() + "(entry)); \n")
            .append("} \n")
            .append("return result; \n")
            .append("} \n")
            .append("return null; \n");


    fromMapList.body().directStatement(mBuilder.toString());
}
 
开发者ID:Kaufland,项目名称:andcouchbaseentity,代码行数:22,代码来源:EntityGeneration.java


示例2: buildFactory

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
JMethod buildFactory(Map<String, JMethod> constructorMethods) throws JClassAlreadyExistsException {
    JDefinedClass factory = buildFactoryClass(constructorMethods);

    JFieldVar factoryField = environment.buildValueClassField(JMod.PRIVATE | JMod.STATIC | JMod.FINAL, factory, "FACTORY");
    JAnnotationUse fieldAnnotationUse = factoryField.annotate(SuppressWarnings.class);
    JAnnotationArrayMember paramArray = fieldAnnotationUse.paramArray("value");
    paramArray.param("unchecked");
    paramArray.param("rawtypes");

    factoryField.init(JExpr._new(factory));
    JMethod factoryMethod = environment.buildValueClassMethod(Source.toJMod(environment.factoryMethodAccessLevel()) | JMod.STATIC, "factory");
    Source.annotateNonnull(factoryMethod);
    JAnnotationUse methodAnnotationUse = factoryMethod.annotate(SuppressWarnings.class);
    methodAnnotationUse.param("value", "unchecked");
    for (JTypeVar visitorTypeParameter: environment.getValueTypeParameters()) {
        JTypeVar typeParameter = factoryMethod.generify(visitorTypeParameter.name());
        typeParameter.boundLike(visitorTypeParameter);
    }
    AbstractJClass usedValueClassType = environment.wrappedValueClassType(factoryMethod.typeParams());
    factoryMethod.type(environment.visitor(usedValueClassType, usedValueClassType, types._RuntimeException).getVisitorType());
    factoryMethod.body()._return(factoryField);
    return factoryMethod;
}
 
开发者ID:sviperll,项目名称:adt4j,代码行数:24,代码来源:FinalValueClassModel.java


示例3: declareAcceptMethod

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
private JMethod declareAcceptMethod(JDefinedClass caseClass, AbstractJClass usedValueClassType) {
    JMethod acceptMethod = caseClass.method(JMod.PUBLIC, types._void, environment.acceptMethodName());
    acceptMethod.annotate(Override.class);
    JTypeVar visitorResultTypeParameter = environment.visitorDefinition().getResultTypeParameter();
    AbstractJClass resultType;
    if (visitorResultTypeParameter == null)
        resultType = types._Object;
    else {
        JTypeVar resultTypeVar = acceptMethod.generify(visitorResultTypeParameter.name());
        resultTypeVar.boundLike(visitorResultTypeParameter);
        resultType = resultTypeVar;
    }
    acceptMethod.type(resultType);
    JTypeVar visitorExceptionTypeParameter = environment.visitorDefinition().getExceptionTypeParameter();
    JTypeVar exceptionType = null;
    if (visitorExceptionTypeParameter != null) {
        JTypeVar exceptionTypeParameter = acceptMethod.generify(visitorExceptionTypeParameter.name());
        exceptionTypeParameter.boundLike(visitorExceptionTypeParameter);
        exceptionType = exceptionTypeParameter;
        acceptMethod._throws(exceptionType);
    }
    VisitorDefinition.VisitorUsage usedVisitorType = environment.visitor(usedValueClassType, resultType, exceptionType);
    acceptMethod.param(usedVisitorType.getVisitorType(), "visitor");
    return acceptMethod;
}
 
开发者ID:sviperll,项目名称:adt4j,代码行数:26,代码来源:FinalValueClassModel.java


示例4: buildProtectedConstructor

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
void buildProtectedConstructor(Serialization serialization) {
    JMethod constructor = environment.buildValueClassConstructor(JMod.PROTECTED);
    JAnnotationUse annotation = constructor.annotate(SuppressWarnings.class);
    annotation.paramArray("value", "null");
    AbstractJClass unwrappedUsedValueClassType = environment.unwrappedValueClassTypeInsideValueClass();
    JVar param = constructor.param(unwrappedUsedValueClassType, "implementation");
    Source.annotateNonnull(param);
    if (isError) {
        constructor.body()._throw(JExpr._new(types._UnsupportedOperationException));
    } else {
        JConditional nullCheck = constructor.body()._if(JExpr.ref("implementation").eq(JExpr._null()));
        JInvocation nullPointerExceptionConstruction = JExpr._new(types._NullPointerException);
        nullPointerExceptionConstruction.arg(JExpr.lit("Argument shouldn't be null: 'implementation' argument in class constructor invocation: " + environment.valueClassQualifiedName()));
        nullCheck._then()._throw(nullPointerExceptionConstruction);

        if (environment.hashCodeCaching().enabled())
            constructor.body().assign(JExpr.refthis(hashCodeCachedValueField), param.ref(hashCodeCachedValueField));
        constructor.body().assign(JExpr.refthis(acceptorField), param.ref(acceptorField));
    }
}
 
开发者ID:sviperll,项目名称:adt4j,代码行数:21,代码来源:FinalValueClassModel.java


示例5: generatePredicate

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
void generatePredicate(String name, PredicateConfigutation predicate) {
    JMethod predicateMethod = environment.buildValueClassMethod(Source.toJMod(predicate.accessLevel()) | JMod.FINAL, name);
    predicateMethod.type(types._boolean);
    if (isError) {
        predicateMethod.body()._throw(JExpr._new(types._UnsupportedOperationException));
    } else {
        JMethod implementation = environment.buildAcceptingInterfaceMethod(JMod.PUBLIC, name);
        implementation.type(types._boolean);

        predicateMethod.body()._return(JExpr.refthis(acceptorField).invoke(implementation));

        for (JMethod interfaceMethod1: environment.visitorDefinition().methodDefinitions()) {
            JDefinedClass caseClass = caseClasses.get(interfaceMethod1.name());
            predicateMethod = caseClass.method(JMod.PUBLIC | JMod.FINAL, types._boolean, name);
            predicateMethod.annotate(Override.class);

            boolean result = predicate.isTrueFor(interfaceMethod1);
            predicateMethod.body()._return(JExpr.lit(result));
        }
    }
}
 
开发者ID:sviperll,项目名称:adt4j,代码行数:22,代码来源:FinalValueClassModel.java


示例6: read

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
private GenerationResult<Void> read(JMethod interfaceMethod, String predicateName, MemberAccess accessLevel) {
    GenerationProcess generation = new GenerationProcess();
    if (predicateName.equals(":auto")) {
        predicateName = "is" + Source.capitalize(interfaceMethod.name());
    }
    PredicateConfigutation existingConfiguration = predicates.get(predicateName);
    if (existingConfiguration == null) {
        existingConfiguration = new PredicateConfigutation(interfaceMethod, accessLevel);
        predicates.put(predicateName, existingConfiguration);
    }
    try {
        existingConfiguration.put(interfaceMethod, accessLevel);
    } catch (PredicateConfigurationException ex) {
        generation.reportError(MessageFormat.format("Unable to generate {0} predicate: inconsistent access levels: {1}",
                                                       predicateName, ex.getMessage()));
    }
    return generation.createGenerationResult(null);
}
 
开发者ID:sviperll,项目名称:adt4j,代码行数:19,代码来源:PredicatesReader.java


示例7: visitEnum_def

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
@Override
public Void visitEnum_def(Enum_defContext ctx) {
    try {
        String name = ctx.enum_name().IDENTIFIER().getText();
        ProtoContext pkgCtx = (ProtoContext) ctx.getParent();
        String pkg = pkgCtx.package_def().package_name().QUALIFIED_IDENTIFIER().getText();
        JPackage jPackage = codeModel._package( pkg );
        JDefinedClass m = codeModel._package( pkg )._enum( name );
        JDefinedClass container = jPackage._getClass( containerName );

        String tag = "tag";
        m.field( JMod.PUBLIC | JMod.FINAL, codeModel.INT, tag );

        JMethod constructor = m.constructor( JMod.PRIVATE );
        constructor.param( codeModel.INT, tag );
        constructor.body().assign( JExpr._this().ref( tag ), JExpr.ref( tag ) );

        addDenifition( container, m );

        logger.info( "Enum({}.{})", m._package().name(), m.name() );
        return super.visitEnum_def( ctx );
    }
    catch ( JClassAlreadyExistsException err ) {
        throw new RuntimeException( err );
    }
}
 
开发者ID:turbospaces,项目名称:protoc,代码行数:27,代码来源:Antlr4ProtoVisitor.java


示例8: tag

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
public static int tag(JFieldVar f, JDefinedClass m, JCodeModel codeModel) {
    String getterName = getterName( f, m, codeModel );
    JMethod getter = m.getMethod( getterName, new AbstractJType[] {} );
    Collection<JAnnotationUse> annotations = getter.annotations();
    for ( JAnnotationUse annotation : annotations ) {
        if ( JsonProperty.class.getName().equals( annotation.getAnnotationClass().fullName() ) ) {
            JAnnotationStringValue val = (JAnnotationStringValue) annotation.getParam( "index" );
            Object nativeValue = val.nativeValue();
            if ( nativeValue instanceof Integer )
                return (Integer) val.nativeValue();
            JFieldRef ref = (JFieldRef) nativeValue;
            return Integer.valueOf( expressionValue( fieldInit( m.fields().get( ref.name() ) ) ).toString() );
        }
    }
    throw new IllegalStateException( "no field tag defined in " + f.name() );
}
 
开发者ID:turbospaces,项目名称:protoc,代码行数:17,代码来源:Generator.java


示例9: createGetterBodySubEntity

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
private void createGetterBodySubEntity(CblFieldHolder fieldHolder, JMethod getter) {
    StringBuilder builder = new StringBuilder();
    builder.append("return (" + fieldHolder.getType().fullName() + ") " + fieldHolder.getSubEntityName() + ".fromMap((");
    if (fieldHolder.isSubEntityIsTypeParam()) {
        builder.append("java.util.List<java.util.Map<String, Object>>");
    } else {
        builder.append("java.util.Map<String, Object>");
    }
    builder.append(")mDoc.get(" + ConversionUtil.convertCamelToUnderscore(fieldHolder.getDbField()).toUpperCase() + "));");

    getter.body().directStatement(builder.toString());
}
 
开发者ID:Kaufland,项目名称:andcouchbaseentity,代码行数:13,代码来源:EntityGeneration.java


示例10: createSetterBodySubEntity

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
private void createSetterBodySubEntity(CblFieldHolder fieldHolder, JMethod setter) {
    StringBuilder builder = new StringBuilder();
    builder.append("mDocChanges.put(" + ConversionUtil.convertCamelToUnderscore(fieldHolder.getDbField()).toUpperCase() + ", " + fieldHolder.getSubEntityName() + ".toMap((");

    if (fieldHolder.isSubEntityIsTypeParam()) {
        builder.append(fieldHolder.getType().fullName());
    } else {
        builder.append(fieldHolder.getSubEntityName());
    }

    builder.append(")value)); return this;");
    setter.body().directStatement(builder.toString());
}
 
开发者ID:Kaufland,项目名称:andcouchbaseentity,代码行数:14,代码来源:EntityGeneration.java


示例11: createToMap

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
private void createToMap(JCodeModel codeModel, JDefinedClass genClazz) {

        JMethod toMap = genClazz.method(JMod.PUBLIC | JMod.STATIC, codeModel.directClass(HashMap.class.getCanonicalName()).narrow(String.class).narrow(Object.class), "toMap");
        toMap.param(genClazz, "obj");

        StringBuilder builderSingle = new StringBuilder();
        builderSingle.append("if(obj == null){ \n");
        builderSingle.append("return null; \n");
        builderSingle.append("} \n");
        builderSingle.append("java.util.HashMap<String, Object> result = new java.util.HashMap<String, Object>(); \n");
        builderSingle.append("result.putAll(obj.mDoc); \n");
        builderSingle.append("result.putAll(obj.mDocChanges);\n");
        builderSingle.append("return result;\n");
        toMap.body().directStatement(builderSingle.toString());

        JMethod toMapList = genClazz.method(JMod.PUBLIC | JMod.STATIC, codeModel.directClass(List.class.getCanonicalName()).narrow(codeModel.directClass(HashMap.class.getCanonicalName()).narrow(String.class).narrow(Object.class)), "toMap");
        toMapList.param(codeModel.directClass(List.class.getCanonicalName()).narrow(genClazz), "obj");

        StringBuilder builderMulti = new StringBuilder();
        builderMulti.append("if(obj == null) return null; \n");
        builderMulti.append("java.util.List<java.util.HashMap<String, Object>> result = new java.util.ArrayList<java.util.HashMap<String, Object>>(); \n");
        builderMulti.append("for(" + genClazz.name() + " entry : obj) {\n");
        builderMulti.append("result.add(((" + genClazz.name() + ")entry).toMap(entry));\n");
        builderMulti.append("}\n");
        builderMulti.append("return result;\n");
        toMapList.body().directStatement(builderMulti.toString());
    }
 
开发者ID:Kaufland,项目名称:andcouchbaseentity,代码行数:28,代码来源:EntityGeneration.java


示例12: createSaveMethod

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
private void createSaveMethod(JCodeModel codeModel, JDefinedClass genClazz, List<CblFieldHolder> attachments, List<CblConstantHolder> constantFields) {
    JMethod mSave = genClazz.method(JMod.PUBLIC, codeModel.VOID, "save");
    mSave._throws(CouchbaseLiteException.class);

    StringBuilder builder = new StringBuilder();
    builder.append("com.couchbase.lite.Document doc = kaufland.com.coachbasebinderapi.PersistenceConfig.getInstance().createOrGet(getId()); \n");

    for (CblConstantHolder constant : constantFields) {
        builder.append("mDocChanges.put(\"" + constant.getDbField() + "\",\"" + constant.getConstantValue() + "\"); \n");
    }

    builder.append("java.util.HashMap<String, Object> temp = new java.util.HashMap<String, Object>(); \n");
    builder.append("if(doc.getProperties() != null){ \n");
    builder.append("temp.putAll(doc.getProperties()); \n");
    builder.append("} \n");
    builder.append("if(mDocChanges != null){ \n");
    builder.append("temp.putAll(mDocChanges); \n");
    builder.append("} \n");
    builder.append("doc.putProperties(temp); \n");

    if (attachments.size() > 0) {

        builder.append("com.couchbase.lite.UnsavedRevision rev = doc.createRevision(); \n");
        for (CblFieldHolder attachment : attachments) {

            builder.append("if(" + attachment.getDbField() + " != null){ \n");
            builder.append("rev.setAttachment(\"" + attachment.getDbField() + "\", \"" + attachment.getAttachmentType() + "\", " + attachment.getDbField() + "); \n");
            builder.append("} \n");
        }
        builder.append("rev.save(); \n");
    }
    builder.append("rebind(doc.getProperties()); \n");

    mSave.body().directStatement(builder.toString());
}
 
开发者ID:Kaufland,项目名称:andcouchbaseentity,代码行数:36,代码来源:EntityGeneration.java


示例13: annotate

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
public JMethod annotate(final Method m) {
  javaxRsAnnotation(m).ifPresent(a -> {
    this.type = a;
    getMethod().annotate(a);
  });
  return getMethod();
}
 
开发者ID:camunda,项目名称:camunda-bpm-swagger,代码行数:8,代码来源:JaxRsAnnotationStep.java


示例14: annotate

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
public JMethod annotate(final String parentPathPrefix, final Method method) {

    this.path = path(parentPathPrefix, method);
    if (!TypeHelper.isResource(methodStep.getReturnType())) {
      getMethod().annotate(Path.class).param("value", this.path);
    }
    return getMethod();
  }
 
开发者ID:camunda,项目名称:camunda-bpm-swagger,代码行数:9,代码来源:PathAnnotationStep.java


示例15: setPermissionMethods

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
private void setPermissionMethods(Element element, EComponentHolder holder, AbstractJClass delegateClass, JFieldVar dispatcherCalledField) {
    ExecutableElement executableElement = (ExecutableElement) element;

    JMethod overrideMethod = codeModelHelper.overrideAnnotatedMethod(executableElement, holder);
    JBlock previousMethodBody = codeModelHelper.removeBody(overrideMethod);

    JBlock overrideMethodBody = overrideMethod.body();
    JConditional conditional = overrideMethodBody._if(dispatcherCalledField.not());

    JBlock thenBlock = conditional._then();
    thenBlock.assign(dispatcherCalledField, JExpr.TRUE);
    String delegateMethodName = element.getSimpleName().toString() + "WithPermissionCheck";

    JInvocation delegateCall = delegateClass.staticInvoke(delegateMethodName)
            .arg(JExpr._this());

    overrideMethod.params().forEach(delegateCall::arg);

    if (overrideMethod.hasVarArgs()) {
        JVar jVar = overrideMethod.varParam();
        if (jVar != null) {
            delegateCall.arg(jVar);
        }
    }

    if (!removeRuntimePermissionsAnnotation(holder.getGeneratedClass())) {
        codeModelHelper.copyAnnotation(overrideMethod, findAnnotation(element));
    }

    thenBlock.add(delegateCall);

    JBlock elseBlock = conditional._else();
    elseBlock.assign(dispatcherCalledField, JExpr.FALSE);
    elseBlock.add(previousMethodBody);
}
 
开发者ID:permissions-dispatcher,项目名称:AndroidAnnotationsPermissionsDispatcherPlugin,代码行数:36,代码来源:NeedsPermissionHandler.java


示例16: processParameters

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
@Override
protected void processParameters(EComponentWithViewSupportHolder holder, JMethod listenerMethod, JInvocation call, List<? extends VariableElement> parameters) {
    boolean hasItemParameter = parameters.size() == 1;

    JVar viewParam = listenerMethod.param(getClasses().VIEW, "view");

    if (hasItemParameter) {
        call.arg(castArgumentIfNecessary(holder, CanonicalNameConstants.VIEW, viewParam, parameters.get(0)));
    }
}
 
开发者ID:m0er,项目名称:androidannotations-interval-click-plugin,代码行数:11,代码来源:IntervalClickHandler.java


示例17: createAcceptingInterface

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
private JDefinedClass createAcceptingInterface() throws JClassAlreadyExistsException {
    JDefinedClass acceptingInterface = valueClass._class(JMod.PUBLIC, valueClass.name() + "Acceptor", EClassType.INTERFACE);

    // Hack to overcome bug in codeModel. We want private interface!!! Not public.
    acceptingInterface.mods().setPrivate();

    for (JTypeVar visitorTypeParameter: configuration.getValueTypeParameters()) {
        JTypeVar typeParameter = acceptingInterface.generify(visitorTypeParameter.name());
        typeParameter.boundLike(visitorTypeParameter);
    }

    JMethod acceptMethod = acceptingInterface.method(JMod.PUBLIC, types._void, configuration.acceptMethodName());

    JTypeVar visitorResultType = configuration.visitorDefinition().getResultTypeParameter();
    AbstractJClass resultType;
    if (visitorResultType == null)
        resultType = types._Object;
    else {
        JTypeVar resultTypeVar = acceptMethod.generify(visitorResultType.name());
        resultTypeVar.boundLike(visitorResultType);
        resultType = resultTypeVar;
    }
    acceptMethod.type(resultType);

    JTypeVar visitorExceptionType = configuration.visitorDefinition().getExceptionTypeParameter();
    JTypeVar exceptionType = null;
    if (visitorExceptionType != null) {
        JTypeVar exceptionTypeParameter = acceptMethod.generify(visitorExceptionType.name());
        exceptionTypeParameter.boundLike(visitorExceptionType);
        exceptionType = exceptionTypeParameter;
        acceptMethod._throws(exceptionType);
    }

    AbstractJClass usedValueClassType = Source.narrowType(valueClass, valueClass.typeParams());
    VisitorDefinition.VisitorUsage usedVisitorType = configuration.visitorDefinition().narrowed(usedValueClassType, resultType, exceptionType);
    acceptMethod.param(usedVisitorType.getVisitorType(), "visitor");

    return acceptingInterface;
}
 
开发者ID:sviperll,项目名称:adt4j,代码行数:40,代码来源:Stage1ValueClassModel.java


示例18: invokeValueClassStaticMethod

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
JInvocation invokeValueClassStaticMethod(JMethod constructorMethod, AbstractJClass[] typeArguments) {
    JInvocation result = valueClass.staticInvoke(constructorMethod);
    for (AbstractJClass typeArgument: typeArguments) {
        result.narrow(typeArgument);
    }
    return result;
}
 
开发者ID:sviperll,项目名称:adt4j,代码行数:8,代码来源:FinalValueClassModelEnvironment.java


示例19: buildCaseClasses

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
private Map<String, JDefinedClass> buildCaseClasses(Serialization serialization) throws JClassAlreadyExistsException {
    Map<String, JDefinedClass> caseClasses = new TreeMap<>();
    for (JMethod interfaceMethod: environment.visitorDefinition().methodDefinitions()) {
        JDefinedClass caseClass = buildCaseClass(interfaceMethod.name(), serialization);
        caseClasses.put(interfaceMethod.name(), caseClass);
    }
    return caseClasses;
}
 
开发者ID:sviperll,项目名称:adt4j,代码行数:9,代码来源:FinalValueClassModel.java


示例20: buildPrivateConstructor

import com.helger.jcodemodel.JMethod; //导入依赖的package包/类
void buildPrivateConstructor() {
    if (!isError) {
        JMethod constructor = environment.buildValueClassConstructor(JMod.PRIVATE);
        JVar acceptorParam = constructor.param(acceptorField.type(), acceptorField.name());
        if (environment.hashCodeCaching() == Caching.PRECOMPUTE) {
            JInvocation invocation = acceptorParam.invoke(hashCodeAcceptorMethodName());
            constructor.body().assign(JExpr.refthis(hashCodeCachedValueField), invocation);
        }
        constructor.body().assign(JExpr.refthis(acceptorField.name()), acceptorParam);
    }
}
 
开发者ID:sviperll,项目名称:adt4j,代码行数:12,代码来源:FinalValueClassModel.java



注:本文中的com.helger.jcodemodel.JMethod类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
Java VoxelDimensions类代码示例发布时间:2022-05-22
下一篇:
Java GraphManager类代码示例发布时间:2022-05-22
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap