Skip to content

Commit

Permalink
metamodel #226 Metamodel: added method isCeylon to check if a type is…
Browse files Browse the repository at this point in the history
… a ceylon type
  • Loading branch information
FroMage committed Jun 26, 2013
1 parent 5a2ff37 commit 137a150
Showing 1 changed file with 8 additions and 0 deletions.
Expand Up @@ -512,4 +512,12 @@ public static List<ProducedType> getParameterProducedTypes(List<Parameter> param
}
return parameterProducedTypes;
}

public static boolean isCeylon(com.redhat.ceylon.compiler.typechecker.model.ClassOrInterface declaration){
if(declaration instanceof LazyClass)
return ((LazyClass) declaration).isCeylon();
if(declaration instanceof LazyInterface)
return ((LazyInterface) declaration).isCeylon();
throw new RuntimeException("Declaration type not supported: "+declaration);
}
}

0 comments on commit 137a150

Please sign in to comment.