示例#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();
 }