com.veromodo.tempo.filters.rules
Class RuleFactory

java.lang.Object
  extended by com.veromodo.tempo.filters.rules.RuleFactory

public class RuleFactory
extends java.lang.Object

templates for standard-nontrivial semantic rules


Nested Class Summary
 class RuleFactory.exprNoTypePredicate<T extends Typeable>
           
 class RuleFactory.exprOnlyTypePredicate<T extends Typeable>
           
 class RuleFactory.noDescriptorPredicate<T extends Describable>
           
 class RuleFactory.onlyDescriptorPredicate<T extends Describable>
           
 
Constructor Summary
RuleFactory()
           
 
Method Summary
 void addNoDescriptorOf(ErrorLog log, MessageSource source, RuleSet rs, java.util.EnumSet<Descriptor.Kind> kinds)
          given a Set of Descriptor Kinds kinds, this method adds semantic rules to the RuleSet rs, such that the given Kinds do not apear in the program.
 void addNoTypeOf(ErrorLog log, MessageSource source, RuleSet rs, java.util.EnumSet<Type.TypeKind> ty)
           
 void addNoTypeOf(ErrorLog log, MessageSource source, RuleSet rs, Type.TypeKind ty)
          given a Type ty, this method adds semantic rules to the RuleSet rs, such that the given Type does not apear in the program.
 void addOnlyDescriptorOf(ErrorLog log, MessageSource source, RuleSet rs, java.util.EnumSet<Descriptor.Kind> kinds)
          given a Set of Descriptor Kinds kinds, this method adds semantic rules to the RuleSet rs, such that the given kinds are the only Descriptor kinds to apear in the program.
 void addOnlyTypeOf(ErrorLog log, MessageSource source, RuleSet rs, java.util.EnumSet<Type.TypeKind> ty)
           
 void addOnlyTypeOf(ErrorLog log, MessageSource source, RuleSet rs, Type.TypeKind ty)
          given a Type ty, this method adds semantic rules to the RuleSet rs, such that the given Type is the only type to apear in the program.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RuleFactory

public RuleFactory()
Method Detail

addNoTypeOf

public void addNoTypeOf(ErrorLog log,
                        MessageSource source,
                        RuleSet rs,
                        Type.TypeKind ty)
given a Type ty, this method adds semantic rules to the RuleSet rs, such that the given Type does not apear in the program.

(for now this is limited to expressions)

Parameters:
rs - to add the checks to
ty - the type to be band

addNoTypeOf

public void addNoTypeOf(ErrorLog log,
                        MessageSource source,
                        RuleSet rs,
                        java.util.EnumSet<Type.TypeKind> ty)

addOnlyTypeOf

public void addOnlyTypeOf(ErrorLog log,
                          MessageSource source,
                          RuleSet rs,
                          Type.TypeKind ty)
given a Type ty, this method adds semantic rules to the RuleSet rs, such that the given Type is the only type to apear in the program.

(for now this is limited to expressions)

Parameters:
rs - to add the checks to
ty - the only type to be accepted

addOnlyTypeOf

public void addOnlyTypeOf(ErrorLog log,
                          MessageSource source,
                          RuleSet rs,
                          java.util.EnumSet<Type.TypeKind> ty)

addNoDescriptorOf

public void addNoDescriptorOf(ErrorLog log,
                              MessageSource source,
                              RuleSet rs,
                              java.util.EnumSet<Descriptor.Kind> kinds)
given a Set of Descriptor Kinds kinds, this method adds semantic rules to the RuleSet rs, such that the given Kinds do not apear in the program.

Parameters:
rs - to add the checks to
kinds - the set of kinds to be band
See Also:
com#veromodo#sem#desc#Descriptor

addOnlyDescriptorOf

public void addOnlyDescriptorOf(ErrorLog log,
                                MessageSource source,
                                RuleSet rs,
                                java.util.EnumSet<Descriptor.Kind> kinds)
given a Set of Descriptor Kinds kinds, this method adds semantic rules to the RuleSet rs, such that the given kinds are the only Descriptor kinds to apear in the program.

Parameters:
rs - to add the checks to
kinds - the only kinds to be accepted
See Also:
Descriptor