You can not create vector of objects, see ?vector:
mode
character string naming an atomic mode or "list" or "expression" or (except for vector) "any".
setClass("DistributionConstraintObj",slots = c(p = "numeric", minSize = "integer", maxSize = "integer"))
vector("DistributionConstraintObj", 25)
Error in vector("DistributionConstraintObj", 25) : vector: cannot make a vector of mode 'DistributionConstraintObj'.
So either use a list, or use mode="list" if you still want to pre-allocate the memory:
setClass("DistributionConstraintObj",
slots = c(p = "numeric", minSize = "integer", maxSize = "integer"))
setClass("SampleSizeDistribution",
slots = c(sampleSizeDistDictionary = "vector", numEntries = "integer", limitSampleSize = "integer"),
prototype = list(sampleSizeDistDictionary = vector("list", 25),
numEntries = as.integer(0), limitSampleSize = as.integer(25)))