Пример #1
0
 protected void generateInitializers(@NotNull Function0<ExpressionCodegen> createCodegen) {
   NotNullLazyValue<ExpressionCodegen> codegen =
       LockBasedStorageManager.NO_LOCKS.createLazyValue(createCodegen);
   for (JetDeclaration declaration : ((JetDeclarationContainer) element).getDeclarations()) {
     if (declaration instanceof JetProperty) {
       if (shouldInitializeProperty((JetProperty) declaration)) {
         initializeProperty(codegen.invoke(), (JetProperty) declaration);
       }
     } else if (declaration instanceof JetClassInitializer) {
       codegen.invoke().gen(((JetClassInitializer) declaration).getBody(), Type.VOID_TYPE);
     }
   }
 }
Пример #2
0
 @Override
 public String toString() {
   try {
     if (lazyValue.isComputed()) {
       return getActualType().toString();
     } else {
       return "<Not computed yet>";
     }
   } catch (ReenteringLazyValueComputationException e) {
     return "<Failed to compute this type>";
   }
 }
 @NotNull
 @Override
 public JetType getDefaultType() {
   return defaultType.invoke();
 }
 @NotNull
 @Override
 public TypeConstructor getTypeConstructor() {
   return typeConstructor.invoke();
 }
 @NotNull
 @Override
 public JetType getUpperBoundsAsType() {
   return upperBoundsAsType.invoke();
 }
Пример #6
0
 @NotNull
 public JetType getActualType() {
   return lazyValue.invoke();
 }
Пример #7
0
 public boolean isComputed() {
   return lazyValue.isComputed();
 }
Пример #8
0
 @NotNull
 @Override
 public ReceiverParameterDescriptor getThisAsReceiverParameter() {
   return thisAsReceiverParameter.invoke();
 }
Пример #9
0
 @NotNull
 public JetScope getScopeForPropertyInitializerResolution() {
   return scopeForPropertyInitializerResolution.invoke();
 }
Пример #10
0
 @NotNull
 public JetScope getScopeForMemberDeclarationResolution() {
   return scopeForMemberDeclarationResolution.invoke();
 }
Пример #11
0
 @NotNull
 public JetScope getScopeForClassHeaderResolution() {
   return scopeForClassHeaderResolution.invoke();
 }