• Home
  • Raw
  • Download

Lines Matching refs:moduleElement

81     public ClassName nameGeneratedType(TypeElement moduleElement) {  in nameGeneratedType()  argument
82 return moduleProxies.constructorProxyTypeName(moduleElement); in nameGeneratedType()
86 public Element originatingElement(TypeElement moduleElement) { in originatingElement() argument
87 return moduleElement; in originatingElement()
91 public Optional<TypeSpec.Builder> write(TypeElement moduleElement) { in write() argument
92 ModuleKind.checkIsModule(moduleElement, metadataUtil); in write()
93 return moduleProxies.nonPublicNullaryConstructor(moduleElement).isPresent() in write()
94 ? Optional.of(buildProxy(moduleElement)) in write()
98 private TypeSpec.Builder buildProxy(TypeElement moduleElement) { in buildProxy() argument
99 return classBuilder(nameGeneratedType(moduleElement)) in buildProxy()
105 .returns(ClassName.get(moduleElement)) in buildProxy()
106 .addStatement("return new $T()", moduleElement) in buildProxy()
112 private ClassName constructorProxyTypeName(TypeElement moduleElement) { in constructorProxyTypeName() argument
113 ModuleKind.checkIsModule(moduleElement, metadataUtil); in constructorProxyTypeName()
114 ClassName moduleClassName = ClassName.get(moduleElement); in constructorProxyTypeName()
125 private Optional<ExecutableElement> nonPublicNullaryConstructor(TypeElement moduleElement) { in nonPublicNullaryConstructor() argument
126 ModuleKind.checkIsModule(moduleElement, metadataUtil); in nonPublicNullaryConstructor()
127 if (moduleElement.getModifiers().contains(ABSTRACT) in nonPublicNullaryConstructor()
128 || (moduleElement.getNestingKind().isNested() in nonPublicNullaryConstructor()
129 && !moduleElement.getModifiers().contains(STATIC))) { in nonPublicNullaryConstructor()
132 return constructorsIn(elements.getAllMembers(moduleElement)).stream() in nonPublicNullaryConstructor()
144 public CodeBlock newModuleInstance(TypeElement moduleElement, ClassName requestingClass) { in newModuleInstance() argument
145 ModuleKind.checkIsModule(moduleElement, metadataUtil); in newModuleInstance()
147 return nonPublicNullaryConstructor(moduleElement) in newModuleInstance()
151 CodeBlock.of("$T.newInstance()", constructorProxyTypeName(moduleElement))) in newModuleInstance()
152 .orElse(CodeBlock.of("new $T()", moduleElement)); in newModuleInstance()