GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • LiquidJava Docs
  • Getting Started
  • Setup
  • Overview
  • Annotations
  • @Refinement
  • @RefinementAlias
  • @StateRefinement
  • @ExternalRefinementsFor
  • @Ghost
  • @RefinementPredicate
  • Verification Features
  • Method Calls and Returns
  • Conditionals

This view

  • Original page
  • New address

GeezerVison is showing liquid-java.github.io — @RefinementAlias

@RefinementAlias

When the same refinement appears repeatedly, you can define it once with @RefinementAlias and reuse it inside other refinements.

import liquidjava.specification.*;

@RefinementAlias("Percentage(int v) { 0 <= v && v <= 100 }")
public class MyClass {

    @Refinement("Percentage(x)")
    int x = 25;

    @Refinement("Percentage(y)")
    int y = 75;
}

This helps keep contracts shorter and easier to maintain by replacing repeated predicates with a domain-specific alias.

You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.